2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Disable polls in monoforums, enable in Saved Messages.

This commit is contained in:
John Preston
2025-05-27 18:41:30 +04:00
parent 2a153214f6
commit 4c8ff1c7ec
3 changed files with 17 additions and 4 deletions

View File

@@ -663,10 +663,11 @@ bool PeerData::canPinMessages() const {
bool PeerData::canCreatePolls() const {
if (const auto user = asUser()) {
return user->isBot()
&& !user->isSupport()
&& !user->isRepliesChat()
&& !user->isVerifyCodes();
return user->isSelf()
|| (user->isBot()
&& !user->isSupport()
&& !user->isRepliesChat()
&& !user->isVerifyCodes());
}
return Data::CanSend(this, ChatRestriction::SendPolls);
}