Explicitly disallow message updates with "channel_chat_created" content.

This commit is contained in:
levlam 2023-09-06 17:06:21 +03:00
parent 87cdeaadb6
commit 70670d7217

View File

@ -11092,6 +11092,11 @@ bool Client::need_skip_update_message(int64 chat_id, const object_ptr<td_api::me
// don't send messages received before join or getting authorization // don't send messages received before join or getting authorization
return true; return true;
} }
if (!supergroup_info->is_supergroup && message->content_->get_id() == td_api::messageSupergroupChatCreate::ID) {
// don't send message about channel creation, even the bot was added at exactly the same time
return true;
}
} }
if (message->self_destruct_time_ > 0) { if (message->self_destruct_time_ > 0) {