From 9cbc9a788e3f74a604614aeda17bab97d832949c Mon Sep 17 00:00:00 2001 From: morethanwords Date: Wed, 11 Aug 2021 17:47:05 +0300 Subject: [PATCH] Fix doubleclicking outgoing messages --- src/components/chat/bubbles.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/chat/bubbles.ts b/src/components/chat/bubbles.ts index c57ac7a2..c46fc298 100644 --- a/src/components/chat/bubbles.ts +++ b/src/components/chat/bubbles.ts @@ -452,7 +452,8 @@ export default class ChatBubbles { if(!isMobile) { this.listenerSetter.add(this.bubblesContainer)('dblclick', (e) => { - if(this.chat.selection.isSelecting || !this.appMessagesManager.canWriteToPeer(this.peerId, this.chat.threadId)) { + if(this.chat.selection.isSelecting || + !this.appMessagesManager.canWriteToPeer(this.peerId, this.chat.threadId)) { return; } @@ -462,6 +463,11 @@ export default class ChatBubbles { (target.classList.contains('document-selection') ? target.parentElement : null); if(bubble && !bubble.classList.contains('bubble-first')) { const mid = +bubble.dataset.mid; + const message = this.chat.getMessage(mid); + if(message.pFlags.is_outgoing) { + return; + } + this.chat.input.initMessageReply(mid); } });