mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: add senderTimestampMs automatically in reactMessage (#1845)
* docs: how to remove the reaction message * Add `senderTimestampMs` automatically in reactMessage * fix lint
This commit is contained in:
@@ -411,7 +411,7 @@ const sendMsg = await sock.sendMessage(id, listMessage)
|
|||||||
|
|
||||||
const reactionMessage = {
|
const reactionMessage = {
|
||||||
react: {
|
react: {
|
||||||
text: "💖",
|
text: "💖", // use an empty string to remove the reaction
|
||||||
key: message.key
|
key: message.key
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -292,6 +292,10 @@ export const generateWAMessageContent = async(
|
|||||||
} else if('location' in message) {
|
} else if('location' in message) {
|
||||||
m.locationMessage = WAProto.LocationMessage.fromObject(message.location)
|
m.locationMessage = WAProto.LocationMessage.fromObject(message.location)
|
||||||
} else if('react' in message) {
|
} else if('react' in message) {
|
||||||
|
if(!message.react.senderTimestampMs) {
|
||||||
|
message.react.senderTimestampMs = Date.now()
|
||||||
|
}
|
||||||
|
|
||||||
m.reactionMessage = WAProto.ReactionMessage.fromObject(message.react)
|
m.reactionMessage = WAProto.ReactionMessage.fromObject(message.react)
|
||||||
} else if('delete' in message) {
|
} else if('delete' in message) {
|
||||||
m.protocolMessage = {
|
m.protocolMessage = {
|
||||||
|
|||||||
Reference in New Issue
Block a user