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

Question, is there a way to monitor subscription channels in order to create a presence system #361

Open
Ethorsen opened this issue Dec 24, 2021 · 2 comments

Comments

@Ethorsen
Copy link

Ethorsen commented Dec 24, 2021

Hi guys,

I have trusted clients that will handle small chat rooms. It registers a few RPCs for the users to call and publish events on the chat subscription channel.

I'd like to have this worker receive a notification whenever a user subscribe/unsubscribe from the room channel, so it can keep track of who's currently in. A simple presence system.

Is there any way to do this? Any help to push me in the right direction would be appreciated.

Thx

@boenrobot
Copy link

boenrobot commented Mar 30, 2022

It's not properly documented with examples, but there is already a way...

See #152 (comment)

Though I do like your approach with the meta events... Is that part of the standard? Would be nice if it can be enabled/disabled somehow.

@Ethorsen
Copy link
Author

Hey @boenrobot,

Yeah its part of the proto standard, section 14.4.5 Subscription Meta API. I listed the links in the PR.
https://wamp-proto.org/_static/gen/wamp_latest.html#subscription-meta-events
https://crossbar.io/docs/Subscription-Meta-Events-and-Procedures/?highlight=meta#events

Although my changes only implements the Meta Events section of the API (14.4.5.1). I did not create the procedure calls associated (14.4.5.2)

If @mbonneau ever re-surface and is showing interest in the PR, I could work on fully implementing this API. But I've been using my changes for a few months already without any issue. Its pretty much all I need in my project for now.

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

No branches or pull requests

2 participants