This commit is contained in:
Rajeh Taher
2024-03-12 06:23:56 +02:00
committed by GitHub
parent 087b8733fc
commit 8777f7fa70

View File

@@ -99,10 +99,14 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
stanza.attrs.recipient = attrs.recipient
}
if(tag !== 'message' && attrs.type) {
if(!!attrs.type) {
stanza.attrs.type = attrs.type
}
if(tag === "message") {
stanza.attrs.from = authState.creds.me!.id
}
logger.debug({ recv: { tag, attrs }, sent: stanza.attrs }, 'sent ack')
await sendNode(stanza)
}
@@ -111,7 +115,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
const stanza: BinaryNode = ({
tag: 'call',
attrs: {
from: authState.creds.me!.id,
from: authState.creds.me!,
to: callFrom,
},
content: [{