Don't parse empty messages in channels.

This commit is contained in:
John Preston 2024-12-31 13:44:52 +04:00
parent cdedf283ac
commit c810005f86

View file

@ -2758,7 +2758,7 @@ HistoryItem *Session::addNewMessage(
MessageFlags localFlags,
NewMessageType type) {
const auto peerId = PeerFromMessage(data);
if (!peerId) {
if (!peerId || data.type() == mtpc_messageEmpty) {
return nullptr;
}