Skip to content

Commit

Permalink
Better check for empty message text.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: cfc3081dd0d8f5bd250b3d043b77fe1c3449cfd3
  • Loading branch information
levlam committed Aug 12, 2018
1 parent 9d895ea commit b4be4da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion td/telegram/MessagesManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit b4be4da

Please sign in to comment.