diff --git a/src/Socket/chats.ts b/src/Socket/chats.ts index ab5b2b3..bed2f79 100644 --- a/src/Socket/chats.ts +++ b/src/Socket/chats.ts @@ -44,6 +44,7 @@ import { BinaryNode, getBinaryNodeChild, getBinaryNodeChildren, + jidDecode, jidNormalizedUser, reduceBinaryNodeToDictionary, S_WHATSAPP_NET @@ -637,10 +638,13 @@ export const makeChatsSocket = (config: SocketConfig) => { } }) } else { + const { server } = jidDecode(toJid)! + const isLid = server === 'lid' + await sendNode({ tag: 'chatstate', attrs: { - from: me.id, + from: isLid ? me.lid! : me.id, to: toJid! }, content: [