Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apps/meteor/app/api/server/v1/im.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,9 @@ API.v1.addRoute(
...parseIds(starredIds, 'starred._id'),
...(pinned && pinned.toLowerCase() === 'true' ? { pinned: true } : {}),
};
const sortObj = { ts: sort?.ts ?? -1 };

const { cursor, totalCount } = Messages.findPaginated(ourQuery, {
sort: sortObj,
sort: sort,
Comment thread
MahmoudMowiena marked this conversation as resolved.
Outdated
skip: offset,
limit: count,
...(fields && { projection: fields }),
Expand Down