Open FZambia opened 7 years ago
Just looked through code and it seems that centrifuge-android
can't be used for private channel subscriptions yet.
Also I see that here we set client for User - what's its meaning?
Then here we pass clientId to constructor arguments - this is not necessary as client id will be issued by Centrifugo after successful connect. You already do this right but to generate private sign users need to know that client ID so it needs getter method - I can't find it.
Every time client reconnects client should resubscribe on channels. This means that every time it must set new sign in subscription request based on new client ID received from Centrifugo. In other clients we solve this providing callback mechanism: for example see how it was added in centrifuge-python
: https://github.com/centrifugal/centrifuge-python/commit/1b0f3234aa748fb1dc1326ff54eb1ad98f5537d3
As far as I can see there are 2 methods one and two in subscription object so it's possible to set private sign. But to create sign users also need to know client ID of current connection.
@SammyVimes could you document how to do private channel subscription?