Disallow deletion of TopicCreate service messages.

This commit is contained in:
levlam 2022-10-26 13:58:13 +03:00
parent ce59ab321f
commit e1bc6a3394

View File

@ -10886,7 +10886,8 @@ bool MessagesManager::can_delete_channel_message(const DialogParticipantStatus &
return false;
}
auto content_type = m->content->get_type();
if (content_type == MessageContentType::ChannelMigrateFrom || content_type == MessageContentType::ChannelCreate) {
if (content_type == MessageContentType::ChannelMigrateFrom || content_type == MessageContentType::ChannelCreate ||
content_type == MessageContentType::TopicCreate) {
return false;
}