mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 07:25:46 +00:00
Create a call in legacy group with migration.
This commit is contained in:
@@ -230,6 +230,11 @@ void TopBarWidget::groupCall() {
|
|||||||
} else {
|
} else {
|
||||||
Core::App().calls().startGroupCall(megagroup);
|
Core::App().calls().startGroupCall(megagroup);
|
||||||
}
|
}
|
||||||
|
} else if (const auto chat = peer->asChat()) {
|
||||||
|
const auto start = [=](not_null<ChannelData*> megagroup) {
|
||||||
|
Core::App().calls().startGroupCall(megagroup);
|
||||||
|
};
|
||||||
|
peer->session().api().migrateChat(chat, crl::guard(this, start));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -731,6 +736,8 @@ void TopBarWidget::updateControlsVisibility() {
|
|||||||
if (const auto peer = _activeChat.key.peer()) {
|
if (const auto peer = _activeChat.key.peer()) {
|
||||||
if (const auto megagroup = peer->asMegagroup()) {
|
if (const auto megagroup = peer->asMegagroup()) {
|
||||||
return megagroup->canManageCall();
|
return megagroup->canManageCall();
|
||||||
|
} else if (const auto chat = peer->asChat()) {
|
||||||
|
return chat->amCreator();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Submodule Telegram/lib_base updated: 01a7497eb8...69f70b8f47
2
cmake
2
cmake
Submodule cmake updated: 28b11b099a...f29f5e727f
Reference in New Issue
Block a user