_Rocket.Chat v0.71.1_
I found the docs and codebase are out of sync regarding expected arguments for subscribing to a livechat room stream via DDP.
Also, it doesn't throw an error to catch or debug the subscription attempt, seems to just silently return false.
Code:
What's expected seems to be:
"ROOM_ID",
{
"args":[{ "visitorToken":"TOKEN" }]
}
The documentation shows a token argument instead of visitorToken - I think that's what's usually required and seems to even be used for livechat notification streams, just not messages. It should be consistent, no? Also it's unclear if the documented useCollection attribute does anything.
Still, after resolving the proper attributes for the subscription, there seems to be no events emitted on the stream when messages are sent to the room. I was able to get the messages from a regular stream-room-messages though. Does this stream only emit events like agent assignment? That should also be cleared up in the docs.
Ping @renatobecker
Thanks @timkinnane!
I'll take a look at this issue ASAP.
Thanks @timkinnane It works
@timkinnane thanks a lot, dude!
It's worked after 3 days of unsuccessful attempts to receive messages.
@renatobecker 02/14/20 today xD
Are the docs seriously not fixed after two years????