mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-22 20:12:02 -06:00
Added message status to the messaging-history.set
This commit is contained in:
parent
8caf3a0a7b
commit
bb974e10f5
@ -32,6 +32,7 @@ export class MessageRaw {
|
||||
source_reply_id?: string;
|
||||
chatwoot?: ChatwootMessage;
|
||||
contextInfo?: any;
|
||||
status?: wa.StatusMessage | any;
|
||||
}
|
||||
|
||||
type MessageRawBoolean<T> = {
|
||||
|
@ -976,6 +976,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],
|
||||
@ -984,6 +993,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