Support telegram_api::updateChannelViewForumAsMessages updates.

This commit is contained in:
levlam 2023-11-16 17:11:36 +03:00
parent a2b133ead5
commit 7ffcd56f23
2 changed files with 7 additions and 7 deletions

View File

@ -3509,6 +3509,12 @@ void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateChannelAvailabl
promise.set_value(Unit());
}
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateChannelViewForumAsMessages> update,
Promise<Unit> &&promise) {
td_->messages_manager_->on_update_dialog_view_as_messages(DialogId(ChannelId(update->channel_id_)), update->enabled_);
promise.set_value(Unit());
}
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateReadChannelDiscussionInbox> update,
Promise<Unit> &&promise) {
auto last_read_inbox_message_id = MessageId(ServerMessageId(update->read_max_id_));
@ -4386,9 +4392,4 @@ void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateNewAuthorizatio
// unsupported updates
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateChannelViewForumAsMessages> update,
Promise<Unit> &&promise) {
promise.set_value(Unit());
}
} // namespace td

View File

@ -534,6 +534,7 @@ class UpdatesManager final : public Actor {
void on_update(tl_object_ptr<telegram_api::updateChannelMessageViews> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateChannelMessageForwards> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateChannelAvailableMessages> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateChannelViewForumAsMessages> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateReadChannelDiscussionInbox> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateReadChannelDiscussionOutbox> update, Promise<Unit> &&promise);
@ -644,8 +645,6 @@ class UpdatesManager final : public Actor {
void on_update(tl_object_ptr<telegram_api::updateNewAuthorization> update, Promise<Unit> &&promise);
// unsupported updates
void on_update(tl_object_ptr<telegram_api::updateChannelViewForumAsMessages> update, Promise<Unit> &&promise);
};
} // namespace td