emitter-io / go

Go/Golang client for emitter
Eclipse Public License 1.0
68 stars 37 forks source link

[IMP] Making a presence call an rpc for consistency #40

Closed Florimond closed 1 week ago

Florimond commented 1 week ago

@kelindar Please be careful when reviewing this PR.

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 https://github.com/emitter-io/emitter/pull/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.