From e7b69c94190edee35cca71682ce072de59e9aa90 Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 7 Oct 2018 02:59:30 +0300 Subject: [PATCH] Fix get_pinned_dialogs in presence of sponsored chat. GitOrigin-RevId: 842d022a1c47856a724f476e4f27236487aee62b --- td/telegram/MessagesManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 2c5092dfe..9b71f3ecd 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -10690,7 +10690,9 @@ vector MessagesManager::get_pinned_dialogs() const { auto it = ordered_dialogs_.begin(); auto end = ordered_dialogs_.end(); while (it != end && it->get_date() >= MIN_PINNED_DIALOG_DATE) { - result.push_back(it->get_dialog_id()); + if (it->get_order() != SPONSORED_DIALOG_ORDER) { + result.push_back(it->get_dialog_id()); + } ++it; }