-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
[IMP] Adds a Status (200) field to Me and Presence response for consistency #427
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…stency NOTE that we also send a Response with 200 in the case of a response to a Presence request with the status flag set to false. In this case, we don't gather the presence statuses on the brokers, but we need to send an empty response instead of just nil. This will allow for an RPC call on Presence. See the SDKs (Go in particular).
Florimond
force-pushed
the
status_field_to_all_responses
branch
from
September 25, 2024 01:15
21d0c19
to
098bae4
Compare
Florimond
added a commit
to emitter-io/go
that referenced
this pull request
Sep 25, 2024
NOTE that this RPC, in case of a status flag set to false, will only work if the broker send an empty response instead of just nil. See emitter-io/emitter#427 Before, when calling Presence, you would receive all response on the presence event handler. Both the status response, and the change events. Now, you receive the status as a result of the call to presence like any RPC, and only receive the changes (subscribe, unsubscribe) on the handler.
Florimond
added a commit
to emitter-io/go
that referenced
this pull request
Sep 25, 2024
NOTE that this RPC, in case of a status flag set to false, will only work if the broker send an empty response instead of just nil. See emitter-io/emitter#427 Before, when calling Presence, you would receive all responses on the presence event handler. Both the status response, and the change events. Now, you receive the status as a result of the call to presence like any RPC, and only receive the changes (subscribe, unsubscribe) on the handler.
kelindar
approved these changes
Sep 25, 2024
Florimond
added a commit
to emitter-io/go
that referenced
this pull request
Sep 25, 2024
NOTE that this RPC, in case of a status flag set to false, will only work if the broker send an empty response instead of just nil. See emitter-io/emitter#427 Before, when calling Presence, you would receive all responses on the presence event handler. Both the status response, and the change events. Now, you receive the status as a result of the call to presence like any RPC, and only receive the changes (subscribe, unsubscribe) on the handler.
Florimond
added a commit
to emitter-io/go
that referenced
this pull request
Sep 25, 2024
NOTE that this RPC, in case of a status flag set to false, will only work if the broker send an empty response instead of just nil. See emitter-io/emitter#427 Before, when calling Presence, you would receive all responses on the presence event handler. Both the status response, and the change events. Now, you receive the status as a result of the call to presence like any RPC, and only receive the changes (subscribe, unsubscribe) on the handler.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@kelindar Note that we seem to only ever return a status when everything went fine and it's a 200. Was this the intention?
NOTE that we also send a Response with 200 in the case of a response to
a Presence request with the status flag set to false. In this case, we
don't gather the presence statuses on the brokers, but we need to send
an empty response instead of just nil. This will allow for an RPC call
on Presence. See the SDKs (Go in particular).