mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
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:
@@ -36,7 +36,7 @@ export interface GroupMetadata {
|
|||||||
participants: GroupParticipant[]
|
participants: GroupParticipant[]
|
||||||
ephemeralDuration?: number
|
ephemeralDuration?: number
|
||||||
inviteCode?: string
|
inviteCode?: string
|
||||||
/** the person who added you */
|
/** the person who added you to group or changed some setting in group */
|
||||||
author?: string
|
author?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ const processMessage = async(
|
|||||||
ev.emit('group-participants.update', { id: jid, author: message.participant!, participants, action })
|
ev.emit('group-participants.update', { id: jid, author: message.participant!, participants, action })
|
||||||
)
|
)
|
||||||
const emitGroupUpdate = (update: Partial<GroupMetadata>) => {
|
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))
|
const participantsIncludesMe = () => participants.find(jid => areJidsSameUser(meId, jid))
|
||||||
|
|||||||
Reference in New Issue
Block a user