mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-23 04:22:02 -06:00
Merge pull request #543 from PauloAK/history-set-message-status
Adicionado message.status ao webhook MESSAGES_SET
This commit is contained in:
commit
234a2c71b5
@ -32,6 +32,7 @@ export class MessageRaw {
|
||||
source_reply_id?: string;
|
||||
chatwoot?: ChatwootMessage;
|
||||
contextInfo?: any;
|
||||
status?: wa.StatusMessage | any;
|
||||
}
|
||||
|
||||
type MessageRawBoolean<T> = {
|
||||
|
@ -1001,6 +1001,15 @@ export class BaileysStartupService extends WAStartupService {
|
||||
continue;
|
||||
}
|
||||
|
||||
const status: Record<number, wa.StatusMessage> = {
|
||||
0: 'ERROR',
|
||||
1: 'PENDING',
|
||||
2: 'SERVER_ACK',
|
||||
3: 'DELIVERY_ACK',
|
||||
4: 'READ',
|
||||
5: 'PLAYED',
|
||||
};
|
||||
|
||||
messagesRaw.push({
|
||||
key: m.key,
|
||||
pushName: m.pushName || m.key.remoteJid.split('@')[0],
|
||||
@ -1009,6 +1018,7 @@ export class BaileysStartupService extends WAStartupService {
|
||||
messageType: getContentType(m.message),
|
||||
messageTimestamp: m.messageTimestamp as number,
|
||||
owner: this.instance.name,
|
||||
status: m.status ? status[m.status] : null,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user