@@ -3848,7 +3848,7 @@ bool ChatManager::can_get_channel_message_statistics(ChannelId channel_id) const
38483848 return false ;
38493849 }
38503850
3851- auto channel_full = get_channel_full (channel_id);
3851+ auto channel_full = get_channel_full_const (channel_id);
38523852 if (channel_full != nullptr ) {
38533853 return channel_full->stats_dc_id .is_exact ();
38543854 }
@@ -3863,7 +3863,7 @@ bool ChatManager::can_get_channel_story_statistics(ChannelId channel_id) const {
38633863 return false ;
38643864 }
38653865
3866- auto channel_full = get_channel_full (channel_id);
3866+ auto channel_full = get_channel_full_const (channel_id);
38673867 if (channel_full != nullptr ) {
38683868 return channel_full->stats_dc_id .is_exact ();
38693869 }
@@ -5065,7 +5065,7 @@ void ChatManager::on_load_channel_full_from_database(ChannelId channel_id, strin
50655065 // G()->td_db()->get_sqlite_pmc()->erase(get_channel_full_database_key(channel_id), Auto());
50665066 // return;
50675067
5068- if (get_channel_full (channel_id, true , " on_load_channel_full_from_database " ) != nullptr || value.empty ()) {
5068+ if (get_channel_full_const (channel_id) != nullptr || value.empty ()) {
50695069 return ;
50705070 }
50715071
@@ -6636,7 +6636,7 @@ void ChatManager::remove_linked_channel_id(ChannelId channel_id) {
66366636}
66376637
66386638ChannelId ChatManager::get_linked_channel_id (ChannelId channel_id) const {
6639- auto channel_full = get_channel_full (channel_id);
6639+ auto channel_full = get_channel_full_const (channel_id);
66406640 if (channel_full != nullptr ) {
66416641 return channel_full->linked_channel_id ;
66426642 }
@@ -7535,7 +7535,7 @@ void ChatManager::on_update_channel_status(Channel *c, ChannelId channel_id, Dia
75357535void ChatManager::on_channel_status_changed (Channel *c, ChannelId channel_id, const DialogParticipantStatus &old_status,
75367536 const DialogParticipantStatus &new_status) {
75377537 CHECK (c->is_update_supergroup_sent );
7538- bool have_channel_full = get_channel_full (channel_id) != nullptr ;
7538+ bool have_channel_full = get_channel_full_const (channel_id) != nullptr ;
75397539
75407540 if (old_status.can_post_stories () != new_status.can_post_stories ()) {
75417541 td_->story_manager_ ->update_dialogs_to_send_stories (channel_id, new_status.can_post_stories ());
@@ -7597,7 +7597,7 @@ void ChatManager::on_channel_status_changed(Channel *c, ChannelId channel_id, co
75977597 }
75987598
75997599 // must not load ChannelFull, because must not change the Channel
7600- CHECK (have_channel_full == (get_channel_full (channel_id) != nullptr ));
7600+ CHECK (have_channel_full == (get_channel_full_const (channel_id) != nullptr ));
76017601}
76027602
76037603void ChatManager::on_update_channel_default_permissions (Channel *c, ChannelId channel_id,
@@ -7846,14 +7846,14 @@ void ChatManager::on_update_channel_usernames(Channel *c, ChannelId channel_id,
78467846
78477847void ChatManager::on_channel_usernames_changed (const Channel *c, ChannelId channel_id, const Usernames &old_usernames,
78487848 const Usernames &new_usernames) {
7849- bool have_channel_full = get_channel_full (channel_id) != nullptr ;
7849+ bool have_channel_full = get_channel_full_const (channel_id) != nullptr ;
78507850 if (!old_usernames.has_first_username () || !new_usernames.has_first_username ()) {
78517851 // moving channel from private to public can change availability of chat members
78527852 invalidate_channel_full (channel_id, !c->is_slow_mode_enabled , " on_channel_usernames_changed" );
78537853 }
78547854
78557855 // must not load ChannelFull, because must not change the Channel
7856- CHECK (have_channel_full == (get_channel_full (channel_id) != nullptr ));
7856+ CHECK (have_channel_full == (get_channel_full_const (channel_id) != nullptr ));
78577857}
78587858
78597859void ChatManager::on_update_channel_description (ChannelId channel_id, string &&description) {
@@ -8113,7 +8113,7 @@ FileSourceId ChatManager::get_channel_full_file_source_id(ChannelId channel_id)
81138113 return FileSourceId ();
81148114 }
81158115
8116- auto channel_full = get_channel_full (channel_id);
8116+ auto channel_full = get_channel_full_const (channel_id);
81178117 if (channel_full != nullptr ) {
81188118 VLOG (file_references) << " Don't need to create file source for full " << channel_id;
81198119 // channel full was already added, source ID was registered and shouldn't be needed
@@ -8744,10 +8744,6 @@ const ChatManager::ChannelFull *ChatManager::get_channel_full_const(ChannelId ch
87448744 return channels_full_.get_pointer (channel_id);
87458745}
87468746
8747- const ChatManager::ChannelFull *ChatManager::get_channel_full (ChannelId channel_id) const {
8748- return channels_full_.get_pointer (channel_id);
8749- }
8750-
87518747ChatManager::ChannelFull *ChatManager::get_channel_full (ChannelId channel_id, bool only_local, const char *source) {
87528748 auto channel_full = channels_full_.get_pointer (channel_id);
87538749 if (channel_full == nullptr ) {
@@ -9652,7 +9648,7 @@ td_api::object_ptr<td_api::supergroup> ChatManager::get_supergroup_object(Channe
96529648}
96539649
96549650tl_object_ptr<td_api::supergroupFullInfo> ChatManager::get_supergroup_full_info_object (ChannelId channel_id) const {
9655- return get_supergroup_full_info_object (channel_id, get_channel_full (channel_id));
9651+ return get_supergroup_full_info_object (channel_id, get_channel_full_const (channel_id));
96569652}
96579653
96589654tl_object_ptr<td_api::supergroupFullInfo> ChatManager::get_supergroup_full_info_object (
0 commit comments