Simpler empty class creation.

This commit is contained in:
levlam 2021-07-31 09:52:23 +03:00
parent 8398a6f19d
commit 966e8b1311

View File

@ -4356,12 +4356,7 @@ class UpdatePeerSettingsQuery final : public Td::ResultHandler {
return on_error(id, result_ptr.move_as_error()); return on_error(id, result_ptr.move_as_error());
} }
td->messages_manager_->on_get_peer_settings( td->messages_manager_->on_get_peer_settings(dialog_id_, make_tl_object<telegram_api::peerSettings>(), true);
dialog_id_,
make_tl_object<telegram_api::peerSettings>(0, false /*ignored*/, false /*ignored*/, false /*ignored*/,
false /*ignored*/, false /*ignored*/, false /*ignored*/,
false /*ignored*/, false /*ignored*/, 0),
true);
promise_.set_value(Unit()); promise_.set_value(Unit());
} }
@ -4398,12 +4393,7 @@ class ReportEncryptedSpamQuery final : public Td::ResultHandler {
return on_error(id, result_ptr.move_as_error()); return on_error(id, result_ptr.move_as_error());
} }
td->messages_manager_->on_get_peer_settings( td->messages_manager_->on_get_peer_settings(dialog_id_, make_tl_object<telegram_api::peerSettings>(), true);
dialog_id_,
make_tl_object<telegram_api::peerSettings>(0, false /*ignored*/, false /*ignored*/, false /*ignored*/,
false /*ignored*/, false /*ignored*/, false /*ignored*/,
false /*ignored*/, false /*ignored*/, 0),
true);
promise_.set_value(Unit()); promise_.set_value(Unit());
} }
@ -19130,8 +19120,8 @@ DialogId MessagesManager::create_new_group_chat(const vector<UserId> &user_ids,
created_dialogs_.erase(it); created_dialogs_.erase(it);
// set default notification settings to newly created chat // set default notification settings to newly created chat
on_update_dialog_notify_settings( on_update_dialog_notify_settings(dialog_id, make_tl_object<telegram_api::peerNotifySettings>(),
dialog_id, make_tl_object<telegram_api::peerNotifySettings>(0, false, false, 0, ""), "create_new_group_chat"); "create_new_group_chat");
promise.set_value(Unit()); promise.set_value(Unit());
return dialog_id; return dialog_id;
@ -19184,8 +19174,8 @@ DialogId MessagesManager::create_new_channel_chat(const string &title, bool is_m
created_dialogs_.erase(it); created_dialogs_.erase(it);
// set default notification settings to newly created chat // set default notification settings to newly created chat
on_update_dialog_notify_settings( on_update_dialog_notify_settings(dialog_id, make_tl_object<telegram_api::peerNotifySettings>(),
dialog_id, make_tl_object<telegram_api::peerNotifySettings>(0, false, false, 0, ""), "create_new_channel_chat"); "create_new_channel_chat");
promise.set_value(Unit()); promise.set_value(Unit());
return dialog_id; return dialog_id;