diff options
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); } |
