status-lib/status/signals/community.nim

13 lines
287 B
Nim
Raw Normal View History

2021-09-08 18:05:39 +00:00
import json
import base
import status/types/community
type CommunitySignal* = ref object of Signal
community*: Community
proc fromEvent*(event: JsonNode): Signal =
var signal: CommunitySignal = CommunitySignal()
signal.community = event["event"].toCommunity()
result = signal