mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Disable creating public polls in channels.
This commit is contained in:
@@ -710,6 +710,9 @@ void PeerMenuShareContactBox(
|
||||
void PeerMenuCreatePoll(not_null<PeerData*> peer) {
|
||||
const auto box = Ui::show(Box<CreatePollBox>(
|
||||
&peer->session(),
|
||||
((peer->isChannel() && !peer->isMegagroup())
|
||||
? CreatePollBox::PublicVotes::Disabled
|
||||
: CreatePollBox::PublicVotes::Enabled),
|
||||
Api::SendType::Normal));
|
||||
const auto lock = box->lifetime().make_state<bool>(false);
|
||||
box->submitRequests(
|
||||
|
Reference in New Issue
Block a user