fix: sendMessage with quoted message id (#3260)
* fix: sendMessage with quoted message id Now using `window.Store.Msg.getMessagesById` instead of `window.Store.Msg.get` * refactor: apply message retrievement to all appropriate places * chore: ignore ide's dirs * fix: set proper variable --------- Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com> Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
parent
22af9df3d0
commit
951ff7bfca
1 changed files with 46 additions and 37 deletions
|
|
@ -49,7 +49,7 @@ class InterfaceController {
|
|||
*/
|
||||
async openChatWindowAt(msgId) {
|
||||
await this.pupPage.evaluate(async msgId => {
|
||||
let msg = await window.Store.Msg.get(msgId);
|
||||
const msg = window.Store.Msg.get(msgId) || (await window.Store.Msg.getMessagesById([msgId]))?.messages?.[0];
|
||||
let chat = await window.Store.Chat.find(msg.id.remote);
|
||||
let searchContext = await window.Store.SearchContext(chat,msg);
|
||||
await window.Store.Cmd.openChatAt(chat, searchContext);
|
||||
|
|
@ -62,7 +62,7 @@ class InterfaceController {
|
|||
*/
|
||||
async openMessageDrawer(msgId) {
|
||||
await this.pupPage.evaluate(async msgId => {
|
||||
let msg = await window.Store.Msg.get(msgId);
|
||||
const msg = window.Store.Msg.get(msgId) || (await window.Store.Msg.getMessagesById([msgId]))?.messages?.[0];
|
||||
await window.Store.Cmd.msgInfoDrawer(msg);
|
||||
}, msgId);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue