Add source to on_update_channel_max_unavailable_message_id.
This commit is contained in:
parent
21074688c3
commit
102222e64f
@ -13128,7 +13128,7 @@ void ContactsManager::on_get_chat_full(tl_object_ptr<telegram_api::ChatFull> &&c
|
|||||||
MessageId(ServerMessageId(channel->read_outbox_max_id_)));
|
MessageId(ServerMessageId(channel->read_outbox_max_id_)));
|
||||||
if ((channel->flags_ & CHANNEL_FULL_FLAG_HAS_AVAILABLE_MIN_MESSAGE_ID) != 0) {
|
if ((channel->flags_ & CHANNEL_FULL_FLAG_HAS_AVAILABLE_MIN_MESSAGE_ID) != 0) {
|
||||||
td_->messages_manager_->on_update_channel_max_unavailable_message_id(
|
td_->messages_manager_->on_update_channel_max_unavailable_message_id(
|
||||||
channel_id, MessageId(ServerMessageId(channel->available_min_id_)));
|
channel_id, MessageId(ServerMessageId(channel->available_min_id_)), "ChannelFull");
|
||||||
}
|
}
|
||||||
td_->messages_manager_->on_read_channel_inbox(channel_id, MessageId(ServerMessageId(channel->read_inbox_max_id_)),
|
td_->messages_manager_->on_read_channel_inbox(channel_id, MessageId(ServerMessageId(channel->read_inbox_max_id_)),
|
||||||
channel->unread_count_, channel->pts_, "ChannelFull");
|
channel->unread_count_, channel->pts_, "ChannelFull");
|
||||||
|
@ -7484,20 +7484,20 @@ void MessagesManager::on_read_channel_outbox(ChannelId channel_id, MessageId max
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MessagesManager::on_update_channel_max_unavailable_message_id(ChannelId channel_id,
|
void MessagesManager::on_update_channel_max_unavailable_message_id(ChannelId channel_id,
|
||||||
MessageId max_unavailable_message_id) {
|
MessageId max_unavailable_message_id,
|
||||||
|
const char *source) {
|
||||||
if (!channel_id.is_valid()) {
|
if (!channel_id.is_valid()) {
|
||||||
LOG(ERROR) << "Receive max_unavailable_message_id in invalid " << channel_id;
|
LOG(ERROR) << "Receive max_unavailable_message_id in invalid " << channel_id << " from " << source;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DialogId dialog_id(channel_id);
|
DialogId dialog_id(channel_id);
|
||||||
CHECK(!max_unavailable_message_id.is_scheduled());
|
CHECK(!max_unavailable_message_id.is_scheduled());
|
||||||
if (!max_unavailable_message_id.is_valid() && max_unavailable_message_id != MessageId()) {
|
if (!max_unavailable_message_id.is_valid() && max_unavailable_message_id != MessageId()) {
|
||||||
LOG(ERROR) << "Receive wrong max_unavailable_message_id: " << max_unavailable_message_id;
|
LOG(ERROR) << "Receive wrong max_unavailable_message_id: " << max_unavailable_message_id << " from " << source;
|
||||||
max_unavailable_message_id = MessageId();
|
max_unavailable_message_id = MessageId();
|
||||||
}
|
}
|
||||||
set_dialog_max_unavailable_message_id(dialog_id, max_unavailable_message_id, true,
|
set_dialog_max_unavailable_message_id(dialog_id, max_unavailable_message_id, true, source);
|
||||||
"on_update_channel_max_unavailable_message_id");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessagesManager::on_update_dialog_online_member_count(DialogId dialog_id, int32 online_member_count,
|
void MessagesManager::on_update_dialog_online_member_count(DialogId dialog_id, int32 online_member_count,
|
||||||
|
@ -376,7 +376,8 @@ class MessagesManager final : public Actor {
|
|||||||
|
|
||||||
void on_read_channel_outbox(ChannelId channel_id, MessageId max_message_id);
|
void on_read_channel_outbox(ChannelId channel_id, MessageId max_message_id);
|
||||||
|
|
||||||
void on_update_channel_max_unavailable_message_id(ChannelId channel_id, MessageId max_unavailable_message_id);
|
void on_update_channel_max_unavailable_message_id(ChannelId channel_id, MessageId max_unavailable_message_id,
|
||||||
|
const char *source);
|
||||||
|
|
||||||
void on_update_dialog_online_member_count(DialogId dialog_id, int32 online_member_count, bool is_from_server);
|
void on_update_dialog_online_member_count(DialogId dialog_id, int32 online_member_count, bool is_from_server);
|
||||||
|
|
||||||
|
@ -3428,7 +3428,8 @@ void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateChannelMessageF
|
|||||||
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateChannelAvailableMessages> update,
|
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateChannelAvailableMessages> update,
|
||||||
Promise<Unit> &&promise) {
|
Promise<Unit> &&promise) {
|
||||||
td_->messages_manager_->on_update_channel_max_unavailable_message_id(
|
td_->messages_manager_->on_update_channel_max_unavailable_message_id(
|
||||||
ChannelId(update->channel_id_), MessageId(ServerMessageId(update->available_min_id_)));
|
ChannelId(update->channel_id_), MessageId(ServerMessageId(update->available_min_id_)),
|
||||||
|
"updateChannelAvailableMessages");
|
||||||
promise.set_value(Unit());
|
promise.set_value(Unit());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user