separate data structure for presence
This commit is contained in:
@@ -119,11 +119,14 @@ const makeMessagesSocket = (config: SocketConfig) => {
|
||||
if(!message.key.fromMe && message.message) {
|
||||
chatUpdate.count = 1
|
||||
const participant = whatsappID(message.participant || jid)
|
||||
chatUpdate.presences = {
|
||||
[participant]: {
|
||||
lastKnownPresence: Presence.available
|
||||
|
||||
ev.emit(
|
||||
'presence.update',
|
||||
{
|
||||
jid,
|
||||
presences: { [participant]: { lastKnownPresence: Presence.available } }
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
const ephemeralProtocolMsg = message.message?.ephemeralMessage?.message?.protocolMessage
|
||||
|
||||
Reference in New Issue
Block a user