Make scheduled message ids determenistic.

Fixes #6686.
This commit is contained in:
John Preston
2022-03-11 11:04:46 +04:00
parent 1bc438ed01
commit 1833fac094
6 changed files with 10 additions and 7 deletions
+1 -4
View File
@@ -113,12 +113,9 @@ HistoryItemsList::const_iterator Groups::findPositionForItem(
const HistoryItemsList &group,
not_null<HistoryItem*> item) {
const auto last = end(group);
if (!item->isRegular()) {
return last;
}
const auto itemId = item->id;
for (auto result = begin(group); result != last; ++result) {
if ((*result)->isRegular() && (*result)->id > itemId) {
if ((*result)->id > itemId) {
return result;
}
}