From 67089d7e95dd06ed1c0353666e2da22d0e6c9270 Mon Sep 17 00:00:00 2001 From: Keyur Shah <51239095+keyurboss@users.noreply.github.com> Date: Sun, 27 Aug 2023 02:34:21 +0530 Subject: [PATCH] fix: Fixed WPP.chat.forwardMessage (#1301) (fix #1300) --- src/chat/functions/forwardMessage.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/chat/functions/forwardMessage.ts b/src/chat/functions/forwardMessage.ts index 26bd6b6653..88cd2eba99 100644 --- a/src/chat/functions/forwardMessage.ts +++ b/src/chat/functions/forwardMessage.ts @@ -15,8 +15,8 @@ */ import { assertFindChat } from '../../assert'; -import { MsgKey, Wid } from '../../whatsapp'; -import { getMessageById, RawMessage } from '..'; +import { ChatStore, MsgKey, Wid } from '../../whatsapp'; +import { getMessageById } from '..'; export interface ForwardMessagesOptions { displayCaptionText?: boolean; @@ -38,14 +38,13 @@ export async function forwardMessage( toChatId: string | Wid, msgId: string | MsgKey, options: ForwardMessagesOptions = {} -): Promise { +): Promise { const chat = await assertFindChat(toChatId); const msg = await getMessageById(msgId); - - return await chat.forwardMessages( + return await ChatStore.forwardMessagesToChats( [msg], - options.multicast, + [chat], options.displayCaptionText ); }