From 87f6c28a1f7021afed1d01146eccc96d82c09adc Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Wed, 3 Feb 2021 05:56:50 +0200 Subject: [PATCH] Fix follow & forward buttons cases --- src/components/chat/bubbles.ts | 2 +- src/components/chat/messageRender.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/chat/bubbles.ts b/src/components/chat/bubbles.ts index 1bfc2988..926f2ed7 100644 --- a/src/components/chat/bubbles.ts +++ b/src/components/chat/bubbles.ts @@ -2431,7 +2431,7 @@ export default class ChatBubbles { bubble.classList.add('is-thread-starter', 'is-group-last'); } - if(savedFrom && this.peerId === rootScope.myId && this.peerId !== REPLIES_PEER_ID) { + if(savedFrom && message.fwd_from.saved_from_msg_id && this.peerId !== REPLIES_PEER_ID) { const goto = document.createElement('div'); goto.classList.add('bubble-beside-button', 'goto-original', 'tgico-arrow_next'); bubbleContainer.append(goto); diff --git a/src/components/chat/messageRender.ts b/src/components/chat/messageRender.ts index af93e24b..0191ad74 100644 --- a/src/components/chat/messageRender.ts +++ b/src/components/chat/messageRender.ts @@ -20,7 +20,7 @@ export namespace MessageRender { bubble.classList.add('channel-post'); time = formatNumber(message.views, 1) + ' ' + (postAuthor ? RichTextProcessor.wrapEmojiText(postAuthor) + ', ' : '') + time; - if(chat.peerId !== chat.appImManager.myId) { + if(!message.fwd_from?.saved_from_msg_id) { const forward = document.createElement('div'); forward.classList.add('bubble-beside-button', 'forward'); forward.innerHTML = `