mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Support creating polls from bot keyboards.
This commit is contained in:
@@ -751,6 +751,17 @@ int PeerData::slowmodeSecondsLeft() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool PeerData::canSendPolls() const {
|
||||
if (const auto user = asUser()) {
|
||||
return user->isBot();
|
||||
} else if (const auto chat = asChat()) {
|
||||
return chat->canSendPolls();
|
||||
} else if (const auto channel = asChannel()) {
|
||||
return channel->canSendPolls();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
namespace Data {
|
||||
|
||||
std::vector<ChatRestrictions> ListOfRestrictions() {
|
||||
|
Reference in New Issue
Block a user