mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Create a call in legacy group with migration.
This commit is contained in:
parent
49fc066480
commit
a61567e1a8
3 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 01a7497eb84abc2353011d7f5dd4a5e6441e6957
|
Subproject commit 69f70b8f47a8c0e3bf75a3ae38d39bd1877655d0
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
||||||
Subproject commit 28b11b099ad54151f38b7d5c0c00ff9ce12d4674
|
Subproject commit f29f5e727f9a4e947ce7cc4456256eb07d3c8c7f
|
Loading…
Add table
Reference in a new issue