Check that there is no duplicate chats in dialog filters.

GitOrigin-RevId: 5a12837a0d34a09a228efe62b6ed9593bb1c7124
This commit is contained in:
levlam 2020-05-27 17:58:54 +03:00
parent d687f0b3fe
commit 7ae25bc255

View File

@ -15273,6 +15273,9 @@ void MessagesManager::sort_dialog_filter_input_dialog_ids(DialogFilter *dialog_f
}; };
return get_order(lhs) < get_order(rhs); return get_order(lhs) < get_order(rhs);
}); });
for (size_t i = 0; i + 1 < input_dialog_ids.size(); i++) {
CHECK(input_dialog_ids[i].get_dialog_id() != input_dialog_ids[i + 1].get_dialog_id());
}
}; };
sort_input_dialog_ids(dialog_filter->excluded_dialog_ids); sort_input_dialog_ids(dialog_filter->excluded_dialog_ids);