Recheck received from the server channels.
This commit is contained in:
parent
036f37fe43
commit
246f2ca42f
@ -9409,10 +9409,13 @@ void ContactsManager::on_get_created_public_channels(PublicDialogType type,
|
|||||||
if (created_public_channels_inited_[index] && created_public_channels_[index] == channel_ids) {
|
if (created_public_channels_inited_[index] && created_public_channels_[index] == channel_ids) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
created_public_channels_[index].clear();
|
||||||
for (auto channel_id : channel_ids) {
|
for (auto channel_id : channel_ids) {
|
||||||
td_->messages_manager_->force_create_dialog(DialogId(channel_id), "on_get_created_public_channels");
|
td_->messages_manager_->force_create_dialog(DialogId(channel_id), "on_get_created_public_channels");
|
||||||
|
if (is_suitable_created_public_channel(type, get_channel(channel_id))) {
|
||||||
|
created_public_channels_[index].push_back(channel_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
created_public_channels_[index] = std::move(channel_ids);
|
|
||||||
created_public_channels_inited_[index] = true;
|
created_public_channels_inited_[index] = true;
|
||||||
|
|
||||||
if (type == PublicDialogType::HasUsername) {
|
if (type == PublicDialogType::HasUsername) {
|
||||||
|
@ -4682,10 +4682,13 @@ void StoryManager::on_get_dialogs_to_send_stories(vector<tl_object_ptr<telegram_
|
|||||||
if (channels_to_send_stories_inited_ && channels_to_send_stories_ == channel_ids) {
|
if (channels_to_send_stories_inited_ && channels_to_send_stories_ == channel_ids) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
channels_to_send_stories_.clear();
|
||||||
for (auto channel_id : channel_ids) {
|
for (auto channel_id : channel_ids) {
|
||||||
td_->messages_manager_->force_create_dialog(DialogId(channel_id), "on_get_dialogs_to_send_stories");
|
td_->messages_manager_->force_create_dialog(DialogId(channel_id), "on_get_dialogs_to_send_stories");
|
||||||
|
if (td_->contacts_manager_->get_channel_status(channel_id).can_post_stories()) {
|
||||||
|
channels_to_send_stories_.push_back(channel_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
channels_to_send_stories_ = std::move(channel_ids);
|
|
||||||
channels_to_send_stories_inited_ = true;
|
channels_to_send_stories_inited_ = true;
|
||||||
|
|
||||||
save_channels_to_send_stories();
|
save_channels_to_send_stories();
|
||||||
|
Loading…
Reference in New Issue
Block a user