Add missed call to update_channel.

GitOrigin-RevId: e5591a62d9ae123a143d2a4f63ecda7ab587722e
This commit is contained in:
levlam 2018-02-21 04:20:47 +03:00
parent 3119a17518
commit 9ef7a1ec1d

View File

@ -8771,14 +8771,15 @@ void ContactsManager::on_chat_update(telegram_api::chat &chat) {
if (!migrated_to.is_valid()) {
LOG(ERROR) << "Receive invalid " << migrated_to << " in " << debug_str;
} else {
// temporary create the channel
// temporarily create the channel
Channel *c = add_channel(migrated_to);
c->access_hash = input_channel->access_hash_;
c->title = chat.title_;
c->status = DialogParticipantStatus::Left();
c->is_megagroup = true;
// TODO do we need to call update_channel?
// we definitely need to call update_channel, because client should know about every added channel
update_channel(c, channel_id);
// get info about the channel
td_->create_handler<GetChannelsQuery>(Promise<>())->send(std::move(input_channel));