fix: add offset and count pagination params support for chat.getMessageReadReceipts
TE
2mo ago+61+61+01234567890123456789-7-7-0123456789
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments
Proposed changes (including videos or screenshots)
- Added optional
offsetandcountpagination query parameters toChatGetMessageReadReceiptsSchemaand updatedChatGetMessageReadReceiptsto extendPaginatedRequestin@rocket.chat/rest-typings. - Switched schema compiler for
isChatGetMessageReadReceiptsPropsfromajv.compiletoajvQuery.compileto properly coerce query string parameters (e.g."0"and"10") to numbers. - Updated
GetMessageReadReceiptsPropsinapps/meteor/ee/server/api/chat.tsto extendPaginatedRequest. - Added an end-to-end test in
apps/meteor/tests/end-to-end/api/chat.tsensuring requests withoffsetandcountquery parameters return200 OK. - Added changeset file
.changeset/chat-getmessagereadreceipts-pagination-params.md.
Issue(s)
Closes #41719
Steps to test or reproduce
- Make an authenticated
GETrequest to/api/v1/chat.getMessageReadReceiptspassingmessageId,offset, andcountquery parameters:GET /api/v1/chat.getMessageReadReceipts?messageId=<message_id>&offset=0&count=10
Summary by CodeRabbit
-
Bug Fixes
- Fixed validation for
chat.getMessageReadReceiptsrequests using pagination parameters. - The endpoint now accepts optional
countandoffsetvalues while continuing to require a message ID. - Read receipts can now be retrieved using pagination.
- Fixed validation for
-
Tests
- Added coverage confirming paginated receipt requests return successfully with a receipts array.