Skip to content
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

Room return info_updates #123

Merged
merged 2 commits into from Aug 24, 2022
Merged

Conversation

jagerman
Copy link
Member

@jagerman jagerman commented Aug 24, 2022

This works similarly to returning the seqno from post-modifying endpoints, but for room metadata (fields, pinned messages, mods, etc.).

This allows a client to track when the expected change should have been applied to the room when there might be concurrent room polling that could race with a pre-update response.

This PR also fixes a bug found in the added tests where the room's info_updates wasn't being updated when hidden global mods are added/removed, which would cause Session clients to not update the mods list for such a change.

This works similarly to returning the seqno from post-modifying
endpoints, but for room metadata (fields, pinned messages, mods, etc.).

This allows a client to track when the expected change should have been
applied to the room when there might be concurrent room polling that
could race with a pre-update response.
@jagerman jagerman force-pushed the room-return-info-updates branch 2 times, most recently from a6e6ef2 to 28373ab Compare August 24, 2022 18:51
The triggers managing info_updates where not updating when a hidden
global mod/admin was added, but that is wrong because mods/admins of the
room *do* see those entries and need to know (via a changed room
info_updates when polling for new room info) when the mod list changes,
even from a hidden global mod change.

This updates the trigger to apply regardless of the visible_mod value.
Copy link
Contributor

@majestrate majestrate left a comment

Choose a reason for hiding this comment

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

i cannot find anything wrong with this and ci passes

@jagerman jagerman merged commit ea27471 into oxen-io:dev Aug 24, 2022
@jagerman jagerman changed the title Room return info updates Room return info_updates Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants