From 7dd9adb93419510b0885ce724114eddedfd8210e Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 14 May 2020 17:23:07 +0300 Subject: [PATCH] Added handling of updates for edited media in scheduled messages. --- Telegram/SourceFiles/data/data_scheduled_messages.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Telegram/SourceFiles/data/data_scheduled_messages.cpp b/Telegram/SourceFiles/data/data_scheduled_messages.cpp index 01ed13ef7..4adf7116b 100644 --- a/Telegram/SourceFiles/data/data_scheduled_messages.cpp +++ b/Telegram/SourceFiles/data/data_scheduled_messages.cpp @@ -408,6 +408,12 @@ HistoryItem *ScheduledMessages::append( if (i != end(list.itemById)) { const auto existing = i->second; message.match([&](const MTPDmessage &data) { + // Scheduled messages never have an edit date, + // so if we receive a flag about it, + // probably this message was edited. + if (data.is_edit_hide()) { + existing->applyEdition(data); + } existing->updateSentContent({ qs(data.vmessage()), Api::EntitiesFromMTP(