You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
In this it says we should setToken after creating the client, so we did as such. Everything seems to work fine except that when we go into a chat, the listener for new messages seems like it is not updating the MessagesList component:
Here's an extract of what we're doing:
Higher up in the tree we have our provider with our pubnub client instantiated. And we added an app listener that refreshes the token every a certain amount of time. It looks sort of like this
We confirmed that the token is set since we do actually get access to the chat. And it fetches the messages whenever we get into the chat screen. Which is pretty simple:
So from what I could gather it seems like the problem is wherever the messages listener is being set.
Maybe something to do with setToken and react not properly handling this change in the client reference?
Let me know whichever more information you might need for this I'm all in helping out getting this fixed
For anyone with a similar issue than this. We figured out we didn't have presence enabled which seems to be required for the access manager v3 approach.
Hello!
We did an implementation of
react-chat-components
forreact-native
(bare react native project). We approached the auth of this by following https://www.pubnub.com/docs/general/security/access-controlIn this it says we should
setToken
after creating the client, so we did as such. Everything seems to work fine except that when we go into a chat, the listener for new messages seems like it is not updating the MessagesList component:Here's an extract of what we're doing:
Higher up in the tree we have our provider with our pubnub client instantiated. And we added an app listener that refreshes the token every a certain amount of time. It looks sort of like this
We confirmed that the token is set since we do actually get access to the chat. And it fetches the messages whenever we get into the chat screen. Which is pretty simple:
And then our chat looks like this:
So from what I could gather it seems like the problem is wherever the messages listener is being set.
Maybe something to do with
setToken
and react not properly handling this change in the client reference?Let me know whichever more information you might need for this I'm all in helping out getting this fixed
Versions:
Thanks!
The text was updated successfully, but these errors were encountered: