Fix: Agregar fromMe al key de reacciones para mensajes propios
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m11s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m11s
This commit is contained in:
@@ -39,12 +39,13 @@ export default defineEventHandler(async (event) => {
|
||||
|
||||
const rawMessage = msgResult.rows[0].raw_message
|
||||
const jid = rawMessage?.key?.remoteJid
|
||||
const fromMe = rawMessage?.key?.fromMe || false
|
||||
|
||||
if (!jid) {
|
||||
throw createError({ statusCode: 400, message: 'Could not determine message JID' })
|
||||
}
|
||||
|
||||
await baileysManager.sendReaction(instanceId, jid, body.messageId, body.emoji)
|
||||
await baileysManager.sendReaction(instanceId, jid, body.messageId, body.emoji, fromMe)
|
||||
|
||||
return { success: true, messageId: body.messageId, emoji: body.emoji }
|
||||
} catch (error: any) {
|
||||
|
||||
Reference in New Issue
Block a user