fix: get quoted msg (#1841)
This commit is contained in:
parent
a60f5ebf40
commit
d9f9c28276
2 changed files with 4 additions and 2 deletions
|
|
@ -305,8 +305,9 @@ class Message extends Base {
|
||||||
if (!this.hasQuotedMsg) return undefined;
|
if (!this.hasQuotedMsg) return undefined;
|
||||||
|
|
||||||
const quotedMsg = await this.client.pupPage.evaluate((msgId) => {
|
const quotedMsg = await this.client.pupPage.evaluate((msgId) => {
|
||||||
let msg = window.Store.Msg.get(msgId);
|
const msg = window.Store.Msg.get(msgId);
|
||||||
return msg.quotedMsgObj().serialize();
|
const quotedMsg = window.Store.QuotedMsg.getQuotedMsgObj(msg);
|
||||||
|
return window.WWebJS.getMessageModel(quotedMsg);
|
||||||
}, this.id._serialized);
|
}, this.id._serialized);
|
||||||
|
|
||||||
return new Message(this.client, quotedMsg);
|
return new Message(this.client, quotedMsg);
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ exports.ExposeStore = (moduleRaidStr) => {
|
||||||
window.Store.createOrUpdateReactionsModule = window.mR.findModule('createOrUpdateReactions')[0];
|
window.Store.createOrUpdateReactionsModule = window.mR.findModule('createOrUpdateReactions')[0];
|
||||||
window.Store.EphemeralFields = window.mR.findModule('getEphemeralFields')[0];
|
window.Store.EphemeralFields = window.mR.findModule('getEphemeralFields')[0];
|
||||||
window.Store.ReplyUtils = window.mR.findModule('canReplyMsg').length > 0 && window.mR.findModule('canReplyMsg')[0];
|
window.Store.ReplyUtils = window.mR.findModule('canReplyMsg').length > 0 && window.mR.findModule('canReplyMsg')[0];
|
||||||
|
window.Store.QuotedMsg = window.mR.findModule('getQuotedMsgObj')[0];
|
||||||
window.Store.StickerTools = {
|
window.Store.StickerTools = {
|
||||||
...window.mR.findModule('toWebpSticker')[0],
|
...window.mR.findModule('toWebpSticker')[0],
|
||||||
...window.mR.findModule('addWebpMetadata')[0]
|
...window.mR.findModule('addWebpMetadata')[0]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue