Do not store sticker <-> emoji correspondence for bots.
GitOrigin-RevId: a631b0a288629c317402338d54bc8f3a7b027a09
This commit is contained in:
parent
d327618102
commit
c3e7958020
@ -1611,6 +1611,7 @@ void StickersManager::on_get_messages_sticker_set(int64 sticker_set_id,
|
||||
std::unordered_map<int64, FileId> document_id_to_sticker_id;
|
||||
|
||||
s->sticker_ids.clear();
|
||||
bool is_bot = td_->auth_manager_->is_bot();
|
||||
for (auto &document_ptr : documents) {
|
||||
auto sticker_id = on_get_sticker_document(std::move(document_ptr), false);
|
||||
if (!sticker_id.second.is_valid()) {
|
||||
@ -1618,13 +1619,16 @@ void StickersManager::on_get_messages_sticker_set(int64 sticker_set_id,
|
||||
}
|
||||
|
||||
s->sticker_ids.push_back(sticker_id.second);
|
||||
if (!is_bot) {
|
||||
document_id_to_sticker_id.insert(sticker_id);
|
||||
}
|
||||
}
|
||||
if (static_cast<int>(s->sticker_ids.size()) != s->sticker_count) {
|
||||
LOG(ERROR) << "Wrong sticker set size specified";
|
||||
s->sticker_count = static_cast<int>(s->sticker_ids.size());
|
||||
}
|
||||
|
||||
if (!is_bot) {
|
||||
s->emoji_stickers_map_.clear();
|
||||
s->sticker_emojis_map_.clear();
|
||||
for (auto &pack : packs) {
|
||||
@ -1647,6 +1651,7 @@ void StickersManager::on_get_messages_sticker_set(int64 sticker_set_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
update_sticker_set(s);
|
||||
update_load_requests(s, true, Status::OK());
|
||||
|
Loading…
x
Reference in New Issue
Block a user