Show jid of people who changed some setting in group. (#688)

* JId of people who changed settings in group.

* Show jid of people who changed some setting in group.

* fix lint
This commit is contained in:
Lucas Maia
2024-04-28 08:06:38 -03:00
committed by GitHub
parent bb9cc01069
commit 9075086be4
2 changed files with 2 additions and 2 deletions

View File

@@ -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
}

View File

@@ -298,7 +298,7 @@ const processMessage = async(
ev.emit('group-participants.update', { id: jid, author: message.participant!, participants, action })
)
const emitGroupUpdate = (update: Partial<GroupMetadata>) => {
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))