RocketChat / RocketChat/Rocket.Chat
Docs for chat.getMessageReadReceipts incorrectly document offset/count pagination params
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
The API docs page for chat.getMessageReadReceipts lists offset and count as supported query parameters:
https://developer.rocket.chat/apidocs/get-message-read-receipts
However, the actual server implementation does not support these parameters. The request schema explicitly disallows them:
https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rest-typings/src/v1/chat.ts (ChatGetMessageReadReceiptsSchema)
const ChatGetMessageReadReceiptsSchema = {
type: 'object',
properties: {
messageId: { type: 'string' },
},
required: ['messageId'],
additionalProperties: false,
};
And the handler only ever reads messageId:
https://github.com/RocketChat/Rocket.Chat/blob/develop/apps/meteor/ee/server/api/chat.ts
const { messageId } = this.queryParams;
return API.v1.success({ receipts: await getReadReceiptsFunction(messageId, this.userId) });
The response schema also has no offset/count/total fields — just { receipts, success }.
Impact: As of Rocket.Chat 8.7.0, sending offset/count to this endpoint now fails validation with error-invalid-params: must NOT have additional properties (older versions silently ignored the extra params). Since the docs advertise these as valid params, API clients following the docs will break.
Ask: Please update the docs page to remove offset and count from the documented parameters for chat.getMessageReadReceipts, since the endpoint returns the full receipts list in one call and isn't paginated.
Found while fixing https://github.com/jadolg/rocketchat_API/pull/393 in the rocketchat_API Python client.
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 the chat.getMessageReadReceipts API docs page and compare its parameters with ChatGetMessageReadReceiptsSchema in packages/rest-typings/src/v1/chat.ts and the handler in apps/meteor/ee/server/api/chat.ts. Remove offset and count from the documented parameters, then verify the page describes only the supported messageId query and full receipts response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100