From b4be4da02b5e7f839ca528f8cbdee85cdfd07fbb Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 12 Aug 2018 18:02:11 +0300 Subject: [PATCH] Better check for empty message text. GitOrigin-RevId: cfc3081dd0d8f5bd250b3d043b77fe1c3449cfd3 --- td/telegram/MessagesManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 8262e132..4732aa2f 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -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(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 &&