Rocket.chat: Livechat room stream documentation incorrect and errors unreported

Created on 13 Dec 2018  路  4Comments  路  Source: RocketChat/Rocket.Chat

_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.

See docs.

Code:

https://github.com/RocketChat/Rocket.Chat/blob/e6d9375fe28abf907577a1e66220d23b6d2027c1/packages/rocketchat-livechat/server/lib/Livechat.js#L877-L889

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

needed livechat

All 4 comments

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????

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Buzzele picture Buzzele  路  3Comments

tanc picture tanc  路  3Comments

mattlin picture mattlin  路  3Comments

engelgabriel picture engelgabriel  路  3Comments

Kiran-Rao picture Kiran-Rao  路  3Comments