fix: group name when rejoining a group
This commit is contained in:
parent
6c050bf381
commit
fb60d757cf
|
@ -47,6 +47,7 @@ proc toChatMembershipEvent*(jsonMembership: JsonNode): ChatMembershipEvent =
|
||||||
rawPayload: jsonMembership["rawPayload"].getStr,
|
rawPayload: jsonMembership["rawPayload"].getStr,
|
||||||
signature: jsonMembership["signature"].getStr,
|
signature: jsonMembership["signature"].getStr,
|
||||||
eventType: jsonMembership["type"].getInt,
|
eventType: jsonMembership["type"].getInt,
|
||||||
|
name: jsonMembership{"name"}.getStr,
|
||||||
members: @[]
|
members: @[]
|
||||||
)
|
)
|
||||||
if jsonMembership{"members"} != nil:
|
if jsonMembership{"members"} != nil:
|
||||||
|
|
|
@ -32,6 +32,7 @@ type ChatMembershipEvent* = object
|
||||||
chatId*: string
|
chatId*: string
|
||||||
clockValue*: int64
|
clockValue*: int64
|
||||||
fromKey*: string
|
fromKey*: string
|
||||||
|
name*: string
|
||||||
members*: seq[string]
|
members*: seq[string]
|
||||||
rawPayload*: string
|
rawPayload*: string
|
||||||
signature*: string
|
signature*: string
|
||||||
|
@ -40,6 +41,7 @@ type ChatMembershipEvent* = object
|
||||||
proc toJsonNode*(self: ChatMembershipEvent): JsonNode =
|
proc toJsonNode*(self: ChatMembershipEvent): JsonNode =
|
||||||
result = %* {
|
result = %* {
|
||||||
"chatId": self.chatId,
|
"chatId": self.chatId,
|
||||||
|
"name": self.name,
|
||||||
"clockValue": self.clockValue,
|
"clockValue": self.clockValue,
|
||||||
"from": self.fromKey,
|
"from": self.fromKey,
|
||||||
"members": self.members,
|
"members": self.members,
|
||||||
|
|
Loading…
Reference in New Issue