Added logging of api updates when deleted message is unknown.

This commit is contained in:
23rd
2025-10-10 19:01:17 +03:00
committed by John Preston
parent d51195a537
commit 384f6d9a31
3 changed files with 22 additions and 0 deletions

View File

@@ -1627,6 +1627,17 @@ void Updates::feedUpdate(const MTPUpdate &update) {
auto &d = update.c_updateNewChannelMessage();
auto channel = session().data().channelLoaded(peerToChannel(PeerFromMessage(d.vmessage())));
const auto isDataLoaded = AllDataLoadedForMessage(&session(), d.vmessage());
{
// Todo delete.
const auto messageId = IdFromMessage(d.vmessage());
if (const auto history = channel ? session().data().historyLoaded(channel) : nullptr) {
if (history->isUnknownMessageDeleted(messageId)) {
LOG(("Unknown message deleted detected for channel %1, message %2")
.arg(channel->id.value & PeerId::kChatTypeMask)
.arg(messageId.bare));
}
}
}
if (!requestingDifference() && (!channel || isDataLoaded != DataIsLoadedResult::Ok)) {
MTP_LOG(0, ("getDifference "
"{ good - after not all data loaded in updateNewChannelMessage }%1"