RocketChat / RocketChat/Rocket.Chat
Can't sync messages of livechat
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Using endpoint chat.syncMessages, i can't get past messages of active livechat.
I use both X-Auth-Token & X-User-Id with returned value of realtime API live chat visitor (getInitialData method).
Steps to reproduce:
- Call realtime api of register & getInitialData as visitor.
- Send live chat message until you get the roomId.
- Call chat.syncMessages rest api using visitor data, designated roomId & lastUpdated message.
Expected behavior:
Response should be return result of updated messages & success true.
Actual behavior:
Response return status error instead & the message is 'You must be logged in to do this'.
Server Setup Information:
- Version of Rocket.Chat Server: 3.18 self hosted
- Operating System: Mac 11.6
- Deployment Method: Docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: 12.22.1 - x64
- MongoDB Version: 4.0.26
Client Setup Information
- Desktop App or Browser Version: -
- Operating System: Mac 11.6
Additional context
Relevant logs:
{
"status": "error",
"message": "You must be logged in to do this."
}
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
Start at the chat.syncMessages REST endpoint and trace how visitor credentials from the realtime register and getInitialData flow into its authentication check. Reproduce the listed sequence with an active livechat and verify whether the endpoint returns updated messages with success true instead of the reported login error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100