diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index fe5f20084..2f39d077d 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -16043,7 +16043,7 @@ void MessagesManager::on_get_dialog_filters(Resultcontacts_manager_.get()](vector &input_dialog_ids) { std::sort(input_dialog_ids.begin(), input_dialog_ids.end(), @@ -17814,7 +17814,10 @@ void MessagesManager::sort_dialog_filter_input_dialog_ids(DialogFilter *dialog_f for (auto input_dialog_ids : {&dialog_filter->pinned_dialog_ids, &dialog_filter->excluded_dialog_ids, &dialog_filter->included_dialog_ids}) { for (auto input_dialog_id : *input_dialog_ids) { - CHECK(all_dialog_ids.insert(input_dialog_id.get_dialog_id()).second); + LOG_CHECK(all_dialog_ids.insert(input_dialog_id.get_dialog_id()).second) + << source << ' ' << td::contains(dialog_filter->pinned_dialog_ids, input_dialog_id) << ' ' + << td::contains(dialog_filter->excluded_dialog_ids, input_dialog_id) << ' ' + << td::contains(dialog_filter->included_dialog_ids, input_dialog_id); } } } @@ -17877,7 +17880,7 @@ Result> MessagesManager::create_dialog_filter(DialogFil dialog_filter->include_channels = filter->include_channels_; TRY_STATUS(dialog_filter->check_limits()); - sort_dialog_filter_input_dialog_ids(dialog_filter.get()); + sort_dialog_filter_input_dialog_ids(dialog_filter.get(), "create_dialog_filter"); return std::move(dialog_filter); } @@ -18692,7 +18695,7 @@ Status MessagesManager::toggle_dialog_is_pinned(DialogListId dialog_list_id, Dia } TRY_STATUS(new_dialog_filter->check_limits()); - sort_dialog_filter_input_dialog_ids(new_dialog_filter.get()); + sort_dialog_filter_input_dialog_ids(new_dialog_filter.get(), "toggle_dialog_is_pinned"); edit_dialog_filter(std::move(new_dialog_filter), "toggle_dialog_is_pinned"); save_dialog_filters(); @@ -18848,7 +18851,7 @@ Status MessagesManager::set_pinned_dialogs(DialogListId dialog_list_id, vectorincluded_dialog_ids, old_pinned_dialog_ids); TRY_STATUS(new_dialog_filter->check_limits()); - sort_dialog_filter_input_dialog_ids(new_dialog_filter.get()); + sort_dialog_filter_input_dialog_ids(new_dialog_filter.get(), "set_pinned_dialogs"); edit_dialog_filter(std::move(new_dialog_filter), "set_pinned_dialogs"); save_dialog_filters(); @@ -30738,7 +30741,7 @@ void MessagesManager::add_dialog_to_list(DialogId dialog_id, DialogListId dialog if (status.is_error()) { return promise.set_error(std::move(status)); } - sort_dialog_filter_input_dialog_ids(new_dialog_filter.get()); + sort_dialog_filter_input_dialog_ids(new_dialog_filter.get(), "add_dialog_to_list"); edit_dialog_filter(std::move(new_dialog_filter), "add_dialog_to_list"); save_dialog_filters(); diff --git a/td/telegram/MessagesManager.h b/td/telegram/MessagesManager.h index e1d27ccce..a436564a6 100644 --- a/td/telegram/MessagesManager.h +++ b/td/telegram/MessagesManager.h @@ -2472,7 +2472,7 @@ class MessagesManager : public Actor { InputDialogId get_input_dialog_id(DialogId dialog_id) const; - void sort_dialog_filter_input_dialog_ids(DialogFilter *dialog_filter) const; + void sort_dialog_filter_input_dialog_ids(DialogFilter *dialog_filter, const char *source) const; Result> create_dialog_filter(DialogFilterId dialog_filter_id, td_api::object_ptr filter);