RocketChat / RocketChat/Rocket.Chat
Cannot filter livechat history messages with "ts" queryparameter
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Not possible to use "ts" query parameter to filter livechat history messages. Parameter is ignored.
Steps to reproduce:
- As a guest, open a new live chat.
- Send a couple of messages
- Using the REST API to load the Livechat history and specify the "ts"parameter to only retrieve the latest message
Expected behavior:
The history should only return messages AFTER the given timestamp.
Actual behavior:
All messages are returned.
Server Setup Information:
- Version of Rocket.Chat Server: 3.10.5
- Commit: 1e36f4183852248cece3b1ad092bc566a8cfbd52
- Operating System: Linux
- Deployment Method: Cloud
- Number of Running Instances: 1
- DB Replicaset Oplog: wiredTiger
- NodeJS Version: v12.18.4
- MongoDB Version: 4.2.8
- Deployment ID: uMe4Y5PA8XksWcbRr
Client Setup Information
- Desktop App or Browser Version: Chrome
- Operating System: Windows 10 1803
Additional context
If there is no magic that I don't see the parameter is actually called ls (found here but called ts in the documentation.
Either way, neither of the parameters does anything.
Not sure if the documentation is missing something or if I'm doing something wroing.
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 with app/livechat/server/api/v1/message.js at the referenced history endpoint, then compare its query parameter name and behavior with the linked REST API documentation. Reproduce the request using the provided guest-chat steps and timestamp. Done means the documented parameter and endpoint behavior agree and history results are filtered after the supplied timestamp.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100