Fix get_pinned_dialogs in presence of sponsored chat.

GitOrigin-RevId: 842d022a1c47856a724f476e4f27236487aee62b
This commit is contained in:
levlam 2018-10-07 02:59:30 +03:00
parent 09c4422c50
commit e7b69c9419

View File

@ -10690,7 +10690,9 @@ vector<DialogId> MessagesManager::get_pinned_dialogs() const {
auto it = ordered_dialogs_.begin(); auto it = ordered_dialogs_.begin();
auto end = ordered_dialogs_.end(); auto end = ordered_dialogs_.end();
while (it != end && it->get_date() >= MIN_PINNED_DIALOG_DATE) { while (it != end && it->get_date() >= MIN_PINNED_DIALOG_DATE) {
if (it->get_order() != SPONSORED_DIALOG_ORDER) {
result.push_back(it->get_dialog_id()); result.push_back(it->get_dialog_id());
}
++it; ++it;
} }