Skip to content

Commit 7ab4824

Browse files
committed
Always expect joined by the bot monoforums to be administered.
1 parent 4fac467 commit 7ab4824

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

td/telegram/ChatManager.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9107,7 +9107,7 @@ void ChatManager::on_get_channel(telegram_api::channel &channel, const char *sou
91079107

91089108
bool is_admined_monoforum = false;
91099109
if (monoforum_channel_id.is_valid()) {
9110-
Channel *monoforum_c = get_channel(monoforum_channel_id);
9110+
Channel *monoforum_c = get_channel_force(monoforum_channel_id, source);
91119111
if (monoforum_c != nullptr) {
91129112
if (is_monoforum) {
91139113
is_admined_monoforum = monoforum_c->status.can_manage_direct_messages();
@@ -9117,6 +9117,8 @@ void ChatManager::on_get_channel(telegram_api::channel &channel, const char *sou
91179117
monoforum_c->is_changed = true;
91189118
update_channel(monoforum_c, monoforum_channel_id);
91199119
}
9120+
} else if (is_monoforum && status.is_member() && td_->auth_manager_->is_bot()) {
9121+
is_admined_monoforum = true;
91209122
}
91219123
}
91229124

0 commit comments

Comments
 (0)