Fix empty chatAdministrators object creation.
This commit is contained in:
parent
3ae2ec38c5
commit
4bd6bd377b
@ -15793,7 +15793,7 @@ void ContactsManager::reload_dialog_administrators(DialogId dialog_id,
|
|||||||
Promise<td_api::object_ptr<td_api::chatAdministrators>> &&promise) {
|
Promise<td_api::object_ptr<td_api::chatAdministrators>> &&promise) {
|
||||||
auto dialog_type = dialog_id.get_type();
|
auto dialog_type = dialog_id.get_type();
|
||||||
if (dialog_type == DialogType::Chat && !get_chat_permissions(dialog_id.get_chat_id()).is_member()) {
|
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(
|
auto query_promise = PromiseCreator::lambda(
|
||||||
[actor_id = actor_id(this), dialog_id, promise = std::move(promise)](Result<Unit> &&result) mutable {
|
[actor_id = actor_id(this), dialog_id, promise = std::move(promise)](Result<Unit> &&result) mutable {
|
||||||
|
Loading…
Reference in New Issue
Block a user