Fix Message Forward (#3680)

* Fix Message Forward

* Fix Message Forward

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
BenyFilho 2025-08-06 09:51:36 -03:00 • committed by GitHub
commit 35133a72fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 7 deletions

View file

@ -111,7 +111,7 @@ exports.ExposeStore = () => {
...window.require('WAPhoneFindCC') ...window.require('WAPhoneFindCC')
}; };
window.Store.ForwardUtils = { window.Store.ForwardUtils = {
...window.require('WAWebForwardMessagesToChat') ...window.require('WAWebChatForwardMessage')
}; };
window.Store.VCard = { window.Store.VCard = {
...window.require('WAWebFrontendVcardUtils'), ...window.require('WAWebFrontendVcardUtils'),

View file

@ -6,12 +6,7 @@ exports.LoadUtils = () => {
window.WWebJS.forwardMessage = async (chatId, msgId) => { window.WWebJS.forwardMessage = async (chatId, msgId) => {
const msg = window.Store.Msg.get(msgId) || (await window.Store.Msg.getMessagesById([msgId]))?.messages?.[0]; const msg = window.Store.Msg.get(msgId) || (await window.Store.Msg.getMessagesById([msgId]))?.messages?.[0];
const chat = await window.WWebJS.getChat(chatId, { getAsModel: false }); const chat = await window.WWebJS.getChat(chatId, { getAsModel: false });
return window.Store.ForwardUtils.forwardMessages(chat, [msg], true, true);
if (window.compareWwebVersions(window.Debug.VERSION, '>', '2.3000.0')) {
return window.Store.ForwardUtils.forwardMessagesToChats([msg], [chat], true);
} else {
return chat.forwardMessages([msg]);
}
}; };
window.WWebJS.sendSeen = async (chatId) => { window.WWebJS.sendSeen = async (chatId) => {