mirror of
https://github.com/status-im/status-lib.git
synced 2025-01-13 05:54:55 +00:00
15 lines
351 B
Nim
15 lines
351 B
Nim
import json
|
|
|
|
import base
|
|
|
|
import status/types/community
|
|
import signal_type
|
|
|
|
type CommunitySignal* = ref object of Signal
|
|
community*: Community
|
|
|
|
proc fromEvent*(T: type CommunitySignal, event: JsonNode): CommunitySignal =
|
|
result = CommunitySignal()
|
|
result.signalType = SignalType.CommunityFound
|
|
result.community = event["event"].toCommunity()
|