Fix empty reaction in setMessageReaction.

This commit is contained in:
levlam 2022-01-27 14:19:51 +03:00
parent 4e4d7c1e83
commit f00e7aae59

View File

@ -23815,7 +23815,7 @@ void MessagesManager::set_message_reaction(FullMessageId full_message_id, string
return promise.set_error(Status::Error(400, "Message not found"));
}
if (!td::contains(get_message_available_reactions(d, m), reaction)) {
if (!reaction.empty() && !td::contains(get_message_available_reactions(d, m), reaction)) {
return promise.set_error(Status::Error(400, "The reaction isn't available for the message"));
}