-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add autojoin and show join leave events #587
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great. Can you fix the merge and compile errors?
@@ -484,13 +484,14 @@ func (ru *csChannelRules) derivedChannelSpaceParentEvent() (*DerivedEvent, error | |||
} | |||
|
|||
payload := events.Make_SpacePayload_ChannelUpdate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like Evan might not get to this work this week, it's not his highest priority, so we need to make sure it's backwards compatable with old clients by checking for a nil ChannelSettings here, and if ChannelSettings is nil, adding an autoJoin=true if the channelId is a default channel id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoa good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well actually, I think the snapshot will render the channel setting as autojoin=true when the channelupdate is emitted with empty channel settings for the default channel... but if you'd prefer this change, no problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow - yeah looks like that would happen - can we make this change anyway in case that code changes or we start looking at the snapshot in a different way in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually never mind, lets leave this how it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I went ahead and made the change, but I left the old code there too
space payload snapshot channel metadata includes new
ChannelSettings
message with fields forThese can be optionally included in the Channel Inception message, if not all fields are false by default.
Two new messages on Space Payload to manually toggle these two settings, as well as client endpoints.
migration sets autojoin as true for default channels (22 trailing 0s), but from this PR on all channels will be not autojoin unless explicitly toggled on. snapshot migrations apply these defaults.
e2e tests validate: