PhotonChat JavaScript SDK doesn't load messages history
Options
rjkz808
✭
in Photon Chat
Hello. As I know, channel history is being stored in PhotonChat memory until this channel gets destroyed. And it's true - PhotonChat calls the ChannelDestroy webhook of my backend with valid channel state. But the problem is that JavaScript SDK doesn't load this messages even if some clients are connected to a channel. It only loads history if I have 2 tabs opened in my browser with the same session (e.g. when 2 clients are connected to PhotonChat with same user ID). But if there's another user which is connected to specific channel, I don't get this messages back when I connect with another account. Is it a bug on my side or is it an issue of JavaScript SDK? Thank you.
0
Comments
-
Hi,
I tested message history with demo-chat-api application from js sdk package. Message history works for me if historyLength set to 10 or -1 or omitted in chatClient.subscribe() call. Removing 'lastIds' parameter from the call does not change the behavior.
I opened 1 app instance, connected, subscribed to 3 channels and sent some to messages to each. Then in other browser window, I connected and subscribed with other user id and received all the history.
Please let me know if my test does not cover your case.0 -
-
And I also think that it's a bug on PhotonChat JS SDK side0