From c2d88fddc605f07f4d6990e0d705e3e65140d439 Mon Sep 17 00:00:00 2001 From: programadorbob <116108544+programadorbob@users.noreply.github.com> Date: Sat, 8 Jul 2023 18:32:58 -0300 Subject: [PATCH] fix: Added jid of people who added to the group (#223) Co-authored-by: DeveloperNewton <116108544+DeveloperNewton@users.noreply.github.com> Co-authored-by: Edgard --- src/Socket/messages-recv.ts | 5 ++++- src/Types/GroupMetadata.ts | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Socket/messages-recv.ts b/src/Socket/messages-recv.ts index fd0bf9c..a2703ba 100644 --- a/src/Socket/messages-recv.ts +++ b/src/Socket/messages-recv.ts @@ -216,7 +216,10 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => { name: metadata.subject, conversationTimestamp: metadata.creation, }]) - ev.emit('groups.upsert', [metadata]) + ev.emit('groups.upsert', [{ + ...metadata, + author: participant + }]) break case 'ephemeral': case 'not_ephemeral': diff --git a/src/Types/GroupMetadata.ts b/src/Types/GroupMetadata.ts index 853a49f..19c5665 100644 --- a/src/Types/GroupMetadata.ts +++ b/src/Types/GroupMetadata.ts @@ -26,6 +26,8 @@ export interface GroupMetadata { participants: GroupParticipant[] ephemeralDuration?: number inviteCode?: string + /** the person who added you */ + author?: string }