Update messages-send.ts

This commit is contained in:
Rajeh Taher
2023-09-30 21:15:04 +03:00
committed by GitHub
parent 4b98392a38
commit d20830e43f

View File

@@ -312,12 +312,13 @@ export const makeMessagesSocket = (config: SocketConfig) => {
const statusJid = 'status@broadcast'
const isGroup = server === 'g.us'
const isStatus = jid === statusJid
const isLid = server === "lid"
msgId = msgId || generateMessageID()
useUserDevicesCache = useUserDevicesCache !== false
const participants: BinaryNode[] = []
const destinationJid = (!isStatus) ? jidEncode(user, isGroup ? 'g.us' : 's.whatsapp.net') : statusJid
const destinationJid = (!isStatus) ? jidEncode(user, isLid ? 'lid' : isGroup ? 'g.us' : 's.whatsapp.net') : statusJid
const binaryNodeContent: BinaryNode[] = []
const devices: JidWithDevice[] = []