Added callback for delivery & read receipts

This commit is contained in:
Adhiraj
2020-05-09 18:31:58 +05:30
parent 266e695b3d
commit 91cfbd1412
7 changed files with 57 additions and 9 deletions

View File

@@ -21,7 +21,12 @@ class WhatsAppWeb {
recording: "recording", // "recording..."
paused: "paused" // I have no clue
}
// set of statuses visible to other people; see updatePresence() in WhatsAppWeb.Send
static MessageStatus = {
sent: "sent",
received: "received",
read: "read"
}
// set of message types that are supported by the library
static MessageType = {
text: "conversation",
@@ -50,7 +55,8 @@ class WhatsAppWeb {
presenceUpdated: null,
onDisconnect: null,
onUnreadMessage: null,
gotContact: null
gotContact: null,
onMessageStatusChanged: null
}
this.callbacks = {}