Add CHECK debug.
This commit is contained in:
parent
075d004b9f
commit
c03621d72c
@ -47,7 +47,7 @@ void store(const Document &document, StorerT &storer) {
|
||||
td->documents_manager_->store_document(document.file_id, storer);
|
||||
break;
|
||||
case Document::Type::Sticker:
|
||||
td->stickers_manager_->store_sticker(document.file_id, false, storer);
|
||||
td->stickers_manager_->store_sticker(document.file_id, false, storer, "Document");
|
||||
break;
|
||||
case Document::Type::Video:
|
||||
td->videos_manager_->store_video(document.file_id, storer);
|
||||
|
@ -803,7 +803,7 @@ static void store(const MessageContent *content, StorerT &storer) {
|
||||
}
|
||||
case MessageContentType::Sticker: {
|
||||
auto m = static_cast<const MessageSticker *>(content);
|
||||
td->stickers_manager_->store_sticker(m->file_id, false, storer);
|
||||
td->stickers_manager_->store_sticker(m->file_id, false, storer, "MessageSticker");
|
||||
break;
|
||||
}
|
||||
case MessageContentType::Text: {
|
||||
|
@ -1132,7 +1132,7 @@ class StickersManager::StickerListLogEvent {
|
||||
StickersManager *stickers_manager = storer.context()->td().get_actor_unsafe()->stickers_manager_.get();
|
||||
td::store(narrow_cast<int32>(sticker_ids.size()), storer);
|
||||
for (auto sticker_id : sticker_ids) {
|
||||
stickers_manager->store_sticker(sticker_id, false, storer);
|
||||
stickers_manager->store_sticker(sticker_id, false, storer, "StickerListLogEvent");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -266,7 +266,7 @@ class StickersManager final : public Actor {
|
||||
void merge_stickers(FileId new_id, FileId old_id, bool can_delete_old);
|
||||
|
||||
template <class StorerT>
|
||||
void store_sticker(FileId file_id, bool in_sticker_set, StorerT &storer) const;
|
||||
void store_sticker(FileId file_id, bool in_sticker_set, StorerT &storer, const char *source) const;
|
||||
|
||||
template <class ParserT>
|
||||
FileId parse_sticker(bool in_sticker_set, ParserT &parser);
|
||||
|
@ -21,9 +21,9 @@
|
||||
namespace td {
|
||||
|
||||
template <class StorerT>
|
||||
void StickersManager::store_sticker(FileId file_id, bool in_sticker_set, StorerT &storer) const {
|
||||
void StickersManager::store_sticker(FileId file_id, bool in_sticker_set, StorerT &storer, const char *source) const {
|
||||
auto it = stickers_.find(file_id);
|
||||
CHECK(it != stickers_.end());
|
||||
LOG_CHECK(it != stickers_.end()) << file_id << ' ' << in_sticker_set << ' ' << source;
|
||||
const Sticker *sticker = it->second.get();
|
||||
bool has_sticker_set_access_hash = sticker->set_id.is_valid() && !in_sticker_set;
|
||||
bool has_minithumbnail = !sticker->minithumbnail.empty();
|
||||
@ -168,7 +168,7 @@ void StickersManager::store_sticker_set(const StickerSet *sticker_set, bool with
|
||||
store(stored_sticker_count, storer);
|
||||
for (uint32 i = 0; i < stored_sticker_count; i++) {
|
||||
auto sticker_id = sticker_set->sticker_ids[i];
|
||||
store_sticker(sticker_id, true, storer);
|
||||
store_sticker(sticker_id, true, storer, "store_sticker_set");
|
||||
|
||||
if (was_loaded) {
|
||||
auto it = sticker_set->sticker_emojis_map_.find(sticker_id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user