Skip to content

Commit

Permalink
Show jid of people who changed some setting in group. (#688)
Browse files Browse the repository at this point in the history
* JId of people who changed settings in group.

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

* fix lint
  • Loading branch information
Iucasmaia authored Apr 28, 2024
1 parent bb9cc01 commit 9075086
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Types/GroupMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion src/Utils/process-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 9075086

Please sign in to comment.