From 456a19cdfdb6591951e57ed522af0b1af31f4853 Mon Sep 17 00:00:00 2001 From: morethanwords Date: Thu, 30 Sep 2021 00:14:41 +0400 Subject: [PATCH] Fix clearing message caption when editing --- src/components/chat/input.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/chat/input.ts b/src/components/chat/input.ts index 9c017252..f0b9d959 100644 --- a/src/components/chat/input.ts +++ b/src/components/chat/input.ts @@ -1716,8 +1716,9 @@ export default class ChatInput { //return; if(this.editMsgId) { - if(!!value.trim()) { - this.appMessagesManager.editMessage(this.chat.getMessage(this.editMsgId), value, { + const message = this.chat.getMessage(this.editMsgId); + if(!!value.trim() || message.media) { + this.appMessagesManager.editMessage(message, value, { entities, noWebPage: this.noWebPage });