MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / canCreatePolls

Method canCreatePolls

Telegram/SourceFiles/data/data_peer.cpp:708–719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706}
707
708bool PeerData::canCreatePolls(bool forbidInForums) const {
709 if (const auto user = asUser()) {
710 return user->isSelf()
711 || (user->isBot()
712 && !user->isSupport()
713 && !user->isRepliesChat()
714 && !user->isVerifyCodes());
715 } else if (isMonoforum()) {
716 return false;
717 }
718 return Data::CanSend(this, ChatRestriction::SendPolls, forbidInForums);
719}
720
721bool PeerData::canCreateTodoLists(bool forbidInForums) const {
722 if (isMonoforum() || isBroadcast()) {

Callers 4

MakeAttachBotsMenuFunction · 0.80
addCreatePollMethod · 0.80
setupHistoryMethod · 0.80

Calls 6

CanSendFunction · 0.85
isSelfMethod · 0.80
isSupportMethod · 0.80
isRepliesChatMethod · 0.80
isVerifyCodesMethod · 0.80
isBotMethod · 0.45

Tested by

no test coverage detected