diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index b892853d6..9b886e38a 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -17451,11 +17451,6 @@ void MessagesManager::get_messages_from_server(vector &&message_i lock.set_value(Unit()); } -bool MessagesManager::is_dialog_opened(DialogId dialog_id) const { - const Dialog *d = get_dialog(dialog_id); - return d != nullptr && d->is_opened; -} - bool MessagesManager::is_message_edited_recently(FullMessageId full_message_id, int32 seconds) { if (seconds < 0) { return false; diff --git a/td/telegram/MessagesManager.h b/td/telegram/MessagesManager.h index d574cc908..94544c2d1 100644 --- a/td/telegram/MessagesManager.h +++ b/td/telegram/MessagesManager.h @@ -581,8 +581,6 @@ class MessagesManager final : public Actor { void get_message_viewers(FullMessageId full_message_id, Promise> &&promise); - bool is_dialog_opened(DialogId dialog_id) const; - bool is_message_edited_recently(FullMessageId full_message_id, int32 seconds); bool is_deleted_secret_chat(DialogId dialog_id) const; diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index 82ebc0789..95699f526 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -4319,9 +4319,6 @@ void StickersManager::schedule_update_animated_emoji_clicked(const StickerSet *s if (!td_->messages_manager_->have_input_peer(dialog_id, AccessRights::Write)) { return; } - if (!td_->messages_manager_->is_dialog_opened(dialog_id)) { - return; - } auto all_sticker_ids = get_animated_emoji_stickers(sticker_set, emoji); std::unordered_map sticker_ids; @@ -4368,9 +4365,6 @@ void StickersManager::send_update_animated_emoji_clicked(FullMessageId full_mess if (!td_->messages_manager_->have_input_peer(dialog_id, AccessRights::Write)) { return; } - if (!td_->messages_manager_->is_dialog_opened(dialog_id)) { - return; - } send_closure(G()->td(), &Td::send_update, td_api::make_object(