Better check for empty message text.
GitOrigin-RevId: cfc3081dd0d8f5bd250b3d043b77fe1c3449cfd3
This commit is contained in:
parent
9d895eadbe
commit
b4be4da02b
@ -8171,7 +8171,7 @@ bool MessagesManager::can_forward_message(DialogId from_dialog_id, const Message
|
||||
auto content_id = m->content->get_id();
|
||||
if (content_id == MessageText::ID) {
|
||||
auto *text = static_cast<const MessageText *>(m->content.get());
|
||||
return !text->text.text.empty(); // text can't be empty in the new message
|
||||
return !is_empty_string(text->text.text); // text can't be empty in the new message
|
||||
}
|
||||
|
||||
return !is_service_message_content(content_id) && content_id != MessageUnsupported::ID &&
|
||||
|
Reference in New Issue
Block a user