From 73963c0ff85b069ca030433b7cc51591f3f19ced Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Sun, 1 Oct 2023 15:21:18 +0300 Subject: [PATCH] Update messages-send.ts --- src/Socket/messages-send.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Socket/messages-send.ts b/src/Socket/messages-send.ts index cf7031f..8159d16 100644 --- a/src/Socket/messages-send.ts +++ b/src/Socket/messages-send.ts @@ -391,8 +391,8 @@ export const makeMessagesSocket = (config: SocketConfig) => { const senderKeyJids: string[] = [] // ensure a connection is established with every device - for(const { user, device,domainType } of devices) { - const jid = jidEncode(user, domainType == 0 ? 's.whatsapp.net' : 'lid', device) + for(const { user, device } of devices) { + const jid = jidEncode(user, isLid ? 'lid' : 's.whatsapp.net', device) if(!senderKeyMap[jid] || !!participant) { senderKeyJids.push(jid) // store that this person has had the sender keys sent to them @@ -445,7 +445,7 @@ export const makeMessagesSocket = (config: SocketConfig) => { const meJids: string[] = [] const otherJids: string[] = [] for(const { user, device,domainType } of devices) { - const jid = jidEncode(user, domainType == 0 ?'s.whatsapp.net' : 'lid', device) + const jid = jidEncode(user, isLid ? 'lid' : 's.whatsapp.net', device) const isMe = user === meUser if(isMe) { meJids.push(jid)