feat: implement event buffer for offline msgs

!BREAKING_CHANGE

1. this allows all offline notifications to be combined into a batch -- to reduce the number of events being sent out
2. to enable the above, the "message.reaction" event has been made an array. Also removes the need for the "operation" field
3. have also now started processing all events under a single queue to prevent state sync problems
This commit is contained in:
Adhiraj Singh
2022-06-27 13:38:29 +05:30
parent fd80448fcb
commit 7421f55daa
18 changed files with 945 additions and 367 deletions

View File

@@ -75,6 +75,7 @@ const startSock = async() => {
sock.ev.on('messages.update', m => console.log(m))
sock.ev.on('message-receipt.update', m => console.log(m))
sock.ev.on('messages.reaction', m => console.log(m))
sock.ev.on('presence.update', m => console.log(m))
sock.ev.on('chats.update', m => console.log(m))
sock.ev.on('chats.delete', m => console.log(m))