fix: group name when rejoining a group

This commit is contained in:
Richard Ramos 2020-06-22 09:13:14 -04:00 committed by Iuri Matias
parent 6c050bf381
commit fb60d757cf
2 changed files with 3 additions and 0 deletions

View File

@ -47,6 +47,7 @@ proc toChatMembershipEvent*(jsonMembership: JsonNode): ChatMembershipEvent =
rawPayload: jsonMembership["rawPayload"].getStr,
signature: jsonMembership["signature"].getStr,
eventType: jsonMembership["type"].getInt,
name: jsonMembership{"name"}.getStr,
members: @[]
)
if jsonMembership{"members"} != nil:

View File

@ -32,6 +32,7 @@ type ChatMembershipEvent* = object
chatId*: string
clockValue*: int64
fromKey*: string
name*: string
members*: seq[string]
rawPayload*: string
signature*: string
@ -40,6 +41,7 @@ type ChatMembershipEvent* = object
proc toJsonNode*(self: ChatMembershipEvent): JsonNode =
result = %* {
"chatId": self.chatId,
"name": self.name,
"clockValue": self.clockValue,
"from": self.fromKey,
"members": self.members,