Expect that short name of sticker sets can change.
This commit is contained in:
parent
5f5f4029e0
commit
012424074b
@ -3771,8 +3771,8 @@ StickerSetId StickersManager::on_get_sticker_set(tl_object_ptr<telegram_api::sti
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (s->short_name_ != set->short_name_) {
|
if (s->short_name_ != set->short_name_) {
|
||||||
LOG(ERROR) << "Short name of " << set_id << " has changed from \"" << s->short_name_ << "\" to \""
|
LOG(INFO) << "Short name of " << set_id << " has changed from \"" << s->short_name_ << "\" to \""
|
||||||
<< set->short_name_ << "\" from " << source;
|
<< set->short_name_ << "\" from " << source;
|
||||||
short_name_to_sticker_set_id_.erase(clean_username(s->short_name_));
|
short_name_to_sticker_set_id_.erase(clean_username(s->short_name_));
|
||||||
s->short_name_ = std::move(set->short_name_);
|
s->short_name_ = std::move(set->short_name_);
|
||||||
s->is_changed_ = true;
|
s->is_changed_ = true;
|
||||||
@ -4448,15 +4448,16 @@ void StickersManager::on_get_installed_sticker_sets(StickerType sticker_type,
|
|||||||
|
|
||||||
auto sticker_set = get_sticker_set(set_id);
|
auto sticker_set = get_sticker_set(set_id);
|
||||||
CHECK(sticker_set != nullptr);
|
CHECK(sticker_set != nullptr);
|
||||||
LOG_IF(ERROR, !sticker_set->is_installed_) << "Receive non-installed sticker set in getAllStickers";
|
|
||||||
LOG_IF(ERROR, sticker_set->is_archived_) << "Receive archived sticker set in getAllStickers";
|
|
||||||
LOG_IF(ERROR, sticker_set->sticker_type_ != sticker_type)
|
|
||||||
<< "Receive sticker set of a wrong type in getAllStickers";
|
|
||||||
CHECK(sticker_set->is_inited_);
|
CHECK(sticker_set->is_inited_);
|
||||||
|
|
||||||
if (sticker_set->is_installed_ && !sticker_set->is_archived_ && sticker_set->sticker_type_ == sticker_type) {
|
if (sticker_set->is_installed_ && !sticker_set->is_archived_ && sticker_set->sticker_type_ == sticker_type) {
|
||||||
installed_sticker_set_ids.push_back(set_id);
|
installed_sticker_set_ids.push_back(set_id);
|
||||||
uninstalled_sticker_sets.erase(set_id);
|
uninstalled_sticker_sets.erase(set_id);
|
||||||
|
} else {
|
||||||
|
LOG_IF(ERROR, !sticker_set->is_installed_) << "Receive non-installed sticker set in getAllStickers";
|
||||||
|
LOG_IF(ERROR, sticker_set->is_archived_) << "Receive archived sticker set in getAllStickers";
|
||||||
|
LOG_IF(ERROR, sticker_set->sticker_type_ != sticker_type)
|
||||||
|
<< "Receive sticker set of a wrong type in getAllStickers";
|
||||||
}
|
}
|
||||||
update_sticker_set(sticker_set, "on_get_installed_sticker_sets");
|
update_sticker_set(sticker_set, "on_get_installed_sticker_sets");
|
||||||
|
|
||||||
|
@ -358,8 +358,8 @@ void StickersManager::parse_sticker_set(StickerSet *sticker_set, ParserT &parser
|
|||||||
LOG(INFO) << "Title of " << sticker_set->id_ << " has changed";
|
LOG(INFO) << "Title of " << sticker_set->id_ << " has changed";
|
||||||
}
|
}
|
||||||
if (sticker_set->short_name_ != short_name) {
|
if (sticker_set->short_name_ != short_name) {
|
||||||
LOG(ERROR) << "Short name of " << sticker_set->id_ << " has changed from \"" << short_name << "\" to \""
|
LOG(INFO) << "Short name of " << sticker_set->id_ << " has changed from \"" << short_name << "\" to \""
|
||||||
<< sticker_set->short_name_ << "\"";
|
<< sticker_set->short_name_ << "\"";
|
||||||
}
|
}
|
||||||
if (sticker_set->sticker_count_ != sticker_count || sticker_set->hash_ != hash) {
|
if (sticker_set->sticker_count_ != sticker_count || sticker_set->hash_ != hash) {
|
||||||
sticker_set->is_loaded_ = false;
|
sticker_set->is_loaded_ = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user