diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 9ccd3c8ea..b6f8aff04 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -8436,6 +8436,7 @@ ChatReactions MessagesManager::get_dialog_active_reactions(const Dialog *d) cons } } +// affects all users ChatReactions MessagesManager::get_message_active_reactions(const Dialog *d, const Message *m) const { CHECK(d != nullptr); CHECK(m != nullptr); @@ -8450,12 +8451,6 @@ ChatReactions MessagesManager::get_message_active_reactions(const Dialog *d, con << " to determine correct active reactions"; return ChatReactions(); } - } else if (is_anonymous_administrator(dialog_id, nullptr) && !is_broadcast_channel(dialog_id)) { - CHECK(dialog_id.get_type() == DialogType::Channel); - if (!td_->contacts_manager_->get_channel_status(dialog_id.get_channel_id()).is_creator()) { - // only creator can react as the chat - return ChatReactions(); - } } return get_dialog_active_reactions(d); } @@ -23735,6 +23730,11 @@ ChatReactions MessagesManager::get_message_available_reactions(const Dialog *d, if (td_->contacts_manager_->is_megagroup_channel(channel_id) && !td_->contacts_manager_->get_channel_status(channel_id).is_member() && can_send_message(d->dialog_id).is_error()) { + // can't use reactions if can't send messages to the group without joining + can_use_reactions = false; + } else if (is_anonymous_administrator(d->dialog_id, nullptr) && !is_broadcast_channel(d->dialog_id) && + !!td_->contacts_manager_->get_channel_status(channel_id).is_creator()) { + // only creator can react as the chat can_use_reactions = false; } }