RocketChat / RocketChat/Rocket.Chat
Livechat room stream documentation incorrect and errors unreported
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the linked streamlivechatroom documentation alongside packages/rocketchat-livechat/server/lib/Livechat.js#L877-L889. Compare the documented token, visitorToken, useCollection, and event behavior with stream-room-messages and livechat notification streams. Done means the accepted arguments, errors, and emitted events are accurately explained in the documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100