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

Method canRevokeFullHistory

Telegram/SourceFiles/data/data_peer.cpp:1869–1885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1867}
1868
1869bool PeerData::canRevokeFullHistory() const {
1870 if (const auto user = asUser()) {
1871 return !isSelf()
1872 && (!user->isBot() || user->isSupport())
1873 && !user->isInaccessible()
1874 && session().serverConfig().revokePrivateInbox
1875 && (session().serverConfig().revokePrivateTimeLimit == 0x7FFFFFFF);
1876 } else if (const auto chat = asChat()) {
1877 return chat->amCreator();
1878 } else if (const auto megagroup = asMegagroup()) {
1879 return megagroup->amCreator()
1880 && megagroup->membersCountKnown()
1881 && megagroup->canDelete()
1882 && !megagroup->isMonoforum();
1883 }
1884 return false;
1885}
1886
1887bool PeerData::slowmodeApplied() const {
1888 if (const auto channel = asChannel()) {

Callers 2

revokeTextMethod · 0.80
DeleteChatBoxFunction · 0.80

Calls 7

isSupportMethod · 0.80
isInaccessibleMethod · 0.80
membersCountKnownMethod · 0.80
isBotMethod · 0.45
amCreatorMethod · 0.45
canDeleteMethod · 0.45
isMonoforumMethod · 0.45

Tested by

no test coverage detected