Create a call in legacy group with migration.

This commit is contained in:
John Preston 2020-12-08 13:52:11 +04:00
parent 49fc066480
commit a61567e1a8
3 changed files with 9 additions and 2 deletions

View File

@ -230,6 +230,11 @@ void TopBarWidget::groupCall() {
} else {
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 megagroup = peer->asMegagroup()) {
return megagroup->canManageCall();
} else if (const auto chat = peer->asChat()) {
return chat->amCreator();
}
}
return false;

@ -1 +1 @@
Subproject commit 01a7497eb84abc2353011d7f5dd4a5e6441e6957
Subproject commit 69f70b8f47a8c0e3bf75a3ae38d39bd1877655d0

2
cmake

@ -1 +1 @@
Subproject commit 28b11b099ad54151f38b7d5c0c00ff9ce12d4674
Subproject commit f29f5e727f9a4e947ce7cc4456256eb07d3c8c7f