diff --git a/src/Types/GroupMetadata.ts b/src/Types/GroupMetadata.ts index baa284c6849..a7d0dcbad37 100644 --- a/src/Types/GroupMetadata.ts +++ b/src/Types/GroupMetadata.ts @@ -36,7 +36,7 @@ export interface GroupMetadata { participants: GroupParticipant[] ephemeralDuration?: number inviteCode?: string - /** the person who added you */ + /** the person who added you to group or changed some setting in group */ author?: string } diff --git a/src/Utils/process-message.ts b/src/Utils/process-message.ts index 24563a7a5f8..114ccf0c348 100644 --- a/src/Utils/process-message.ts +++ b/src/Utils/process-message.ts @@ -298,7 +298,7 @@ const processMessage = async( ev.emit('group-participants.update', { id: jid, author: message.participant!, participants, action }) ) const emitGroupUpdate = (update: Partial) => { - ev.emit('groups.update', [{ id: jid, ...update }]) + ev.emit('groups.update', [{ id: jid, ...update, author: message.participant ?? undefined }]) } const participantsIncludesMe = () => participants.find(jid => areJidsSameUser(meId, jid))