Skip to content

FIX: ensures stream update object is scoped to its initial topic #1359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 22, 2025

Conversation

jjaffeux
Copy link
Contributor

Before this commit you could end up in this situation where a post-updater is constructed for a specific topic, but the user changes topic mid steam and it ends up updating the same post number but in a different topic as we were only checking for post_number and not the combination of topic_id + post_number.

No test as there's only a unit test at the moment which wouldn't confirm the topic logic.

Before this commit you could end up in this situation where a `post-updater` is constructed for a specific topic, but the user changes topic mid steam and it ends up updating the same post number but in a  different topic as we were only checking for `post_number` and not the combination of `topic_id` + `post_number`.
@@ -57,6 +59,10 @@ export default class PostUpdater extends StreamUpdater {
}

async setCooked(value) {
if (!this.postElement) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not attempt to find cooked on a non existing element

@jjaffeux jjaffeux requested a review from SamSaffron May 22, 2025 09:21
@SamSaffron
Copy link
Member

Thanks heaps

@SamSaffron SamSaffron merged commit b817810 into main May 22, 2025
6 checks passed
@SamSaffron SamSaffron deleted the scrope-to-topic branch May 22, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants