diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index cf24a2b2a..9c99c951e 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -8300,7 +8300,7 @@ void ContactsManager::on_update_chat_rights(Chat *c, ChatId chat_id, bool is_cre void ContactsManager::on_update_chat_participant_count(Chat *c, ChatId chat_id, int32 participant_count, int32 version, const string &debug_str) { if (version <= -1) { - LOG(ERROR) << "Receive wrong version " << version << " from " << debug_str; + LOG(ERROR) << "Receive wrong version " << version << " in " << chat_id << " from " << debug_str; return; } @@ -8366,7 +8366,7 @@ void ContactsManager::on_update_chat_active(Chat *c, ChatId chat_id, bool is_act void ContactsManager::on_update_chat_migrated_to_channel_id(Chat *c, ChatId chat_id, ChannelId migrated_to_channel_id) { if (c->migrated_to_channel_id != migrated_to_channel_id && migrated_to_channel_id.is_valid()) { LOG_IF(ERROR, c->migrated_to_channel_id.is_valid()) - << "Group upgraded to supergroup has changed from " << c->migrated_to_channel_id << " to " + << "Upgraded supergroup ID for " << chat_id << " has changed from " << c->migrated_to_channel_id << " to " << migrated_to_channel_id; c->migrated_to_channel_id = migrated_to_channel_id; c->need_send_update = true; @@ -8397,7 +8397,7 @@ bool ContactsManager::on_update_chat_full_participants_short(ChatFull *chat_full void ContactsManager::on_update_chat_full_participants(ChatFull *chat_full, ChatId chat_id, vector participants, int32 version) { if (version <= -1) { - LOG(ERROR) << "Receive members with wrong version " << version; + LOG(ERROR) << "Receive members with wrong version " << version << " in " << chat_id; return; } diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 1a4c598f2..48b4d50c9 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -22398,7 +22398,7 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq if (!G()->parameters().use_message_db) { // can happen for bots if the message is received first through getMessage in an unknown chat without // last_new_message_id and only after that received through getDifference or getChannelDifference - if (last_new_message_id.is_valid()) { + if (d->last_new_message_id.is_valid()) { LOG(ERROR) << "Receive again " << (message->is_outgoing ? "outgoing" : "incoming") << (message->forward_info == nullptr ? " not" : "") << " forwarded " << message_id << " with content of type " << message_content_type << " in " << dialog_id << " from " << source diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index 38ab14c97..b30d46b2e 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -1006,7 +1006,7 @@ Result FileManager::register_file(FileData &&data, FileLocationSource fi auto status = check_local_location(data.local_.full(), data.size_); if (status.is_error()) { - LOG(WARNING) << "Invalid local location: " << status << " from " << source; + LOG(WARNING) << "Invalid " << data.local_.full() << ": " << status << " from " << source; data.local_ = LocalFileLocation(); if (data.remote_.type() == RemoteFileLocation::Type::Partial) { data.remote_ = {};