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

[IMP] Adds a Status (200) field to Me and Presence response for consistency #427

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

Florimond
Copy link
Member

@Florimond Florimond commented Sep 24, 2024

@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).

@Florimond Florimond self-assigned this Sep 24, 2024
@coveralls
Copy link

coveralls commented Sep 24, 2024

Coverage Status

coverage: 92.798% (+0.005%) from 92.793%
when pulling 098bae4 on status_field_to_all_responses
into 74e6649 on master.

…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 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 kelindar merged commit bcbc979 into master Sep 25, 2024
3 checks passed
@kelindar kelindar deleted the status_field_to_all_responses branch September 25, 2024 08:56
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants