| 1867 | } |
| 1868 | |
| 1869 | bool 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 | |
| 1887 | bool PeerData::slowmodeApplied() const { |
| 1888 | if (const auto channel = asChannel()) { |
no test coverage detected