diff --git a/packages/backend/src/server/api/endpoints/antennas/notes.ts b/packages/backend/src/server/api/endpoints/antennas/notes.ts index 1a78bf26d..6d69971e3 100644 --- a/packages/backend/src/server/api/endpoints/antennas/notes.ts +++ b/packages/backend/src/server/api/endpoints/antennas/notes.ts @@ -109,7 +109,11 @@ export default class extends Endpoint { // eslint- this.queryService.generateBlockedUserQuery(query, me); const notes = await query.getMany(); - notes.sort((a, b) => a.id > b.id ? -1 : 1); + if (sinceId != null && untilId == null) { + notes.sort((a, b) => a.id < b.id ? -1 : 1); + } else { + notes.sort((a, b) => a.id > b.id ? -1 : 1); + } if (notes.length > 0) { this.noteReadService.read(me.id, notes); diff --git a/packages/backend/test/utils.ts b/packages/backend/test/utils.ts index 738635dae..97118d73c 100644 --- a/packages/backend/test/utils.ts +++ b/packages/backend/test/utils.ts @@ -457,6 +457,7 @@ export async function testPaginationConsistency id + ':' + createdAt), expected.map(({ id, createdAt }) => id + ':' + createdAt)); } + */ // 3. untilId指定+limitで取得してつなぎ合わせた結果が期待通りになっていること if (ordering === 'desc') {