Fix popular sticker suggestions.

Regression was introduced in ddb4527159.

Fixes #4966.
This commit is contained in:
John Preston 2018-07-11 22:46:48 +03:00
parent 54cd55523b
commit 06c3082fdf
1 changed files with 6 additions and 0 deletions

View File

@ -2501,6 +2501,12 @@ std::vector<not_null<DocumentData*>> *ApiWrap::stickersByEmoji(
auto &entry = _stickersByEmoji[emoji];
entry.list.clear();
entry.list.reserve(data.vstickers.v.size());
for (const auto &sticker : data.vstickers.v) {
const auto document = _session->data().document(sticker);
if (document->sticker()) {
entry.list.push_back(document);
}
}
entry.hash = data.vhash.v;
entry.received = getms(true);
_session->data().notifyStickersUpdated();