diff options
| author | levlam <levlam@telegram.org> | 2026-07-10 20:54:01 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2026-07-10 20:54:01 +0300 |
| commit | 5e6beb57c2777190688cd5b369c3337af4951327 (patch) | |
| tree | f0c7a700283f067f9a48e26c62dccd8c4f7cdeb5 /td/telegram/CommunityManager.cpp | |
| parent | fb671dce698f1fb7b470d782aabf33538892a8d8 (diff) | |
Accept messageActionChangeCommunity only with accessible communities.
Diffstat (limited to 'td/telegram/CommunityManager.cpp')
| -rw-r--r-- | td/telegram/CommunityManager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/td/telegram/CommunityManager.cpp b/td/telegram/CommunityManager.cpp index 734ce999d..deda69dc5 100644 --- a/td/telegram/CommunityManager.cpp +++ b/td/telegram/CommunityManager.cpp @@ -346,6 +346,11 @@ bool CommunityManager::have_community(CommunityId community_id) const { return communities_.count(community_id) > 0; } +bool CommunityManager::have_accessible_community(CommunityId community_id) const { + const auto *c = get_community(community_id); + return c != nullptr && c->access_hash != 0; +} + const CommunityManager::Community *CommunityManager::get_community(CommunityId community_id) const { return communities_.get_pointer(community_id); } |
