Skip to content

Commit

Permalink
fix: Fixed generated quoted id on msg group (#1079)
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Apr 29, 2023
1 parent 38ba3af commit 48c6780
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/chat/functions/getQuotedMsg.ts
Expand Up @@ -20,7 +20,7 @@ import { ChatStore, MsgKey, MsgModel, Wid } from '../../whatsapp';
import { getMessageById } from './getMessageById';

/**
* Get a reply message
* Get a quoted message
*
* @category Chat
*/
Expand All @@ -36,7 +36,9 @@ export async function getQuotedMsg(id: string | MsgKey): Promise<MsgModel> {
}
);
}
const chat = ChatStore.get(msg.from as Wid);
const chat = msg.id.fromMe
? ChatStore.get(msg.to as Wid)
: ChatStore.get(msg.from as Wid);

const quotedMsgId = new MsgKey({
id: msg.quotedStanzaID,
Expand Down

0 comments on commit 48c6780

Please sign in to comment.