diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 850740164..230789c11 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -4601,7 +4601,7 @@ editMessageSchedulingState chat_id:int53 message_id:int53 scheduling_state:Messa //@description Changes chosen reaction for a message //@chat_id Identifier of the chat to which the message belongs //@message_id Identifier of the message -//@reaction Text representation of the chosen reaction, or an empty string to remove reaction +//@reaction Text representation of the chosen reaction. Can be an empty string or the currently chosen reaction to remove the reaction setMessageReaction chat_id:int53 message_id:int53 reaction:string = Ok; //@description Returns reactions chosen for a message, along with their source diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 187deb642..f3c3100c0 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -23755,7 +23755,8 @@ void MessagesManager::set_message_reaction(FullMessageId full_message_id, string auto &message_reaction = *it; if (message_reaction.is_chosen()) { if (message_reaction.get_reaction() == reaction) { - return promise.set_value(Unit()); + // double set removes reaction + reaction = string(); } message_reaction.set_is_chosen(false); if (message_reaction.is_empty()) {