group events: fix serialization issue

This commit is contained in:
Rajeh Taher
2025-10-07 20:17:07 +03:00
parent 60c688b85d
commit acc5111792
4 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -629,7 +629,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
msg.messageStubType = WAMessageStubType.GROUP_PARTICIPANT_LEAVE
}
msg.messageStubParameters = participants
msg.messageStubParameters = participants.map(a => JSON.stringify(a))
break
case 'subject':
msg.messageStubType = WAMessageStubType.GROUP_CHANGE_SUBJECT
@@ -673,7 +673,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
case 'created_membership_requests':
msg.messageStubType = WAMessageStubType.GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST_NON_ADMIN_ADD
msg.messageStubParameters = [
{ lid: affectedParticipantLid, pn: affectedParticipantPn } as LIDMapping,
JSON.stringify({ lid: affectedParticipantLid, pn: affectedParticipantPn }),
'created',
child.attrs.request_method!
]
@@ -683,7 +683,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
// TODO: LIDMAPPING SUPPORT
msg.messageStubType = WAMessageStubType.GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST_NON_ADMIN_ADD
msg.messageStubParameters = [
{ lid: affectedParticipantLid, pn: affectedParticipantPn } as LIDMapping,
JSON.stringify({ lid: affectedParticipantLid, pn: affectedParticipantPn }),
isDenied ? 'revoked' : 'rejected'
]
break