Improve logging.
This commit is contained in:
parent
0974a8c17e
commit
e212d9c62a
@ -11805,13 +11805,13 @@ void ContactsManager::on_update_user_emoji_status(UserId user_id,
|
||||
on_update_user_emoji_status(u, user_id, EmojiStatus(std::move(emoji_status)));
|
||||
update_user(u, user_id);
|
||||
} else {
|
||||
LOG(INFO) << "Ignore update user emoji status about unknown " << user_id;
|
||||
LOG(INFO) << "Ignore update user premium status about unknown " << user_id;
|
||||
}
|
||||
}
|
||||
|
||||
void ContactsManager::on_update_user_emoji_status(User *u, UserId user_id, EmojiStatus emoji_status) {
|
||||
if (u->emoji_status != emoji_status) {
|
||||
LOG(DEBUG) << "Change emoji status of " << user_id << " from " << u->emoji_status << " to " << emoji_status;
|
||||
LOG(DEBUG) << "Change premium status of " << user_id << " from " << u->emoji_status << " to " << emoji_status;
|
||||
u->emoji_status = emoji_status;
|
||||
}
|
||||
}
|
||||
|
@ -38,9 +38,13 @@ struct EmojiStatuses {
|
||||
for (auto &status : emoji_statuses->statuses_) {
|
||||
EmojiStatus emoji_status(std::move(status));
|
||||
if (emoji_status.is_empty()) {
|
||||
LOG(ERROR) << "Receive empty emoji status";
|
||||
LOG(ERROR) << "Receive empty premium status";
|
||||
continue;
|
||||
}
|
||||
if (emoji_status.get_until_date() != 0) {
|
||||
LOG(ERROR) << "Receive temporary premium status";
|
||||
emoji_status.clear_until_date();
|
||||
}
|
||||
emoji_statuses_.push_back(emoji_status);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user