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:
Alwin Lubbers 2024-09-15 00:44:07 +02:00 • committed by GitHub
commit 951ff7bfca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}