2021-09-08 18:05:39 +00:00
|
|
|
import json
|
|
|
|
|
|
|
|
import base
|
|
|
|
|
|
|
|
import status/types/community
|
2021-09-08 20:55:37 +00:00
|
|
|
import signal_type
|
2021-09-08 18:05:39 +00:00
|
|
|
|
|
|
|
type CommunitySignal* = ref object of Signal
|
|
|
|
community*: Community
|
|
|
|
|
2021-09-08 20:55:37 +00:00
|
|
|
proc fromEvent*(T: type CommunitySignal, event: JsonNode): CommunitySignal =
|
|
|
|
result = CommunitySignal()
|
|
|
|
result.signalType = SignalType.CommunityFound
|
|
|
|
result.community = event["event"].toCommunity()
|