From 0cdfda238fbc6ab1671c47e079aef021b44898fd Mon Sep 17 00:00:00 2001 From: BenyFilho <168232825+BenyFilho@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:13:18 -0300 Subject: [PATCH] Fix Reject Calls (#3909) --- src/util/Injected/Utils.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util/Injected/Utils.js b/src/util/Injected/Utils.js index 510549f..54f9caf 100644 --- a/src/util/Injected/Utils.js +++ b/src/util/Injected/Utils.js @@ -825,22 +825,22 @@ exports.LoadUtils = () => { }; window.WWebJS.rejectCall = async (peerJid, id) => { - peerJid = peerJid.split('@')[0] + '@s.whatsapp.net'; - let userId = window.Store.User.getMaybeMePnUser().user + '@s.whatsapp.net'; + let userId = window.Store.User.getMaybeMePnUser()._serialized; + const stanza = window.Store.SocketWap.wap('call', { id: window.Store.SocketWap.generateId(), - from: window.Store.SocketWap.USER_JID(userId), - to: window.Store.SocketWap.USER_JID(peerJid), + from: userId, + to: peerJid, }, [ window.Store.SocketWap.wap('reject', { 'call-id': id, - 'call-creator': window.Store.SocketWap.USER_JID(peerJid), + 'call-creator': peerJid, count: '0', }) ]); await window.Store.Socket.deprecatedCastStanza(stanza); }; - + window.WWebJS.cropAndResizeImage = async (media, options = {}) => { if (!media.mimetype.includes('image')) throw new Error('Media is not an image');