mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Acknowledge type update
This commit is contained in:
@@ -18,14 +18,13 @@ export default class WhatsAppWebBase extends WAConnection {
|
||||
if (json.cmd === 'ack') {
|
||||
ids = [json.id]
|
||||
}
|
||||
const ackTypes = [MessageStatus.sent, MessageStatus.received, MessageStatus.read]
|
||||
const data: MessageStatusUpdate = {
|
||||
from: json.from,
|
||||
to: json.to,
|
||||
participant: json.participant,
|
||||
timestamp: new Date(json.t * 1000),
|
||||
ids: ids,
|
||||
type: ackTypes[json.ack - 1] || 'unknown (' + json.ack + ')',
|
||||
type: json.ack,
|
||||
}
|
||||
callback(data)
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ export interface MessageStatusUpdate {
|
||||
/** Message IDs read/delivered */
|
||||
ids: string[]
|
||||
/** Status of the Message IDs */
|
||||
type: string
|
||||
type: proto.WebMessageInfo.WEB_MESSAGE_INFO_STATUS
|
||||
}
|
||||
export interface PresenceUpdate {
|
||||
id: string
|
||||
|
||||
Reference in New Issue
Block a user