Asynchronously update message content when story is changed to avoid possible cycles.

This commit is contained in:
levlam 2024-05-15 12:05:45 +03:00
parent 7ab118780a
commit 8d8b9ffc0b

View File

@ -3809,7 +3809,8 @@ void StoryManager::on_story_changed(StoryFullId story_full_id, const Story *stor
[&message_full_ids](const MessageFullId &message_full_id) { message_full_ids.push_back(message_full_id); });
CHECK(!message_full_ids.empty());
for (const auto &message_full_id : message_full_ids) {
td_->messages_manager_->on_external_update_message_content(message_full_id, "on_story_changed");
send_closure_later(G()->messages_manager(), &MessagesManager::on_external_update_message_content,
message_full_id, "on_story_changed");
}
}
}