2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Fix polls forwarding to private chats.

This commit is contained in:
John Preston
2023-02-07 16:28:59 +04:00
parent d7aa18cb0a
commit d889cd0e72
7 changed files with 23 additions and 27 deletions

View File

@@ -991,10 +991,9 @@ void Filler::addManageChat() {
}
void Filler::addCreatePoll() {
constexpr auto kRight = ChatRestriction::SendPolls;
const auto can = _topic
? Data::CanSend(_topic, kRight)
: Data::CanSend(_peer, kRight);
? Data::CanSend(_topic, ChatRestriction::SendPolls)
: _peer->canCreatePolls();
if (!can) {
return;
}