mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: add message events for reactions
This commit is contained in:
@@ -203,6 +203,16 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
chatUpdate.ephemeralExpiration = protocolMsg.ephemeralExpiration || null
|
||||
break
|
||||
}
|
||||
} else if(content.reactionMessage) {
|
||||
const reaction: proto.IReaction = {
|
||||
...content.reactionMessage,
|
||||
key: message.key,
|
||||
}
|
||||
const operation = content.reactionMessage?.text ? 'add' : 'remove'
|
||||
ev.emit(
|
||||
'messages.reaction',
|
||||
{ reaction, key: content.reactionMessage!.key!, operation }
|
||||
)
|
||||
} else if(message.messageStubType) {
|
||||
const meJid = authState.creds.me!.id
|
||||
const jid = message.key!.remoteJid!
|
||||
|
||||
Reference in New Issue
Block a user