Fix empty chatAdministrators object creation.

This commit is contained in:
levlam 2022-06-02 16:34:05 +03:00
parent 3ae2ec38c5
commit 4bd6bd377b

View File

@ -15793,7 +15793,7 @@ void ContactsManager::reload_dialog_administrators(DialogId dialog_id,
Promise<td_api::object_ptr<td_api::chatAdministrators>> &&promise) {
auto dialog_type = dialog_id.get_type();
if (dialog_type == DialogType::Chat && !get_chat_permissions(dialog_id.get_chat_id()).is_member()) {
return promise.set_value(td_api::object_ptr<td_api::chatAdministrators>());
return promise.set_value(td_api::make_object<td_api::chatAdministrators>());
}
auto query_promise = PromiseCreator::lambda(
[actor_id = actor_id(this), dialog_id, promise = std::move(promise)](Result<Unit> &&result) mutable {