From a5becfc042e36c51af2316e6c48ee6adba4b5542 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 14 Jan 2023 06:00:58 +0900 Subject: [PATCH 1/3] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac9d4b835a..c7a789f9ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,7 +51,7 @@ You should also include the user name that made the change. - 0.12.xの変更点についてはこちら https://github.com/syuilo/aiscript/blob/master/CHANGELOG.md#0120 - 0.12.x未満のプラグインは読み込むことはできません - iOS15以下のデバイスはサポートされなくなりました -- Firefox109以下はサポートされなくなりました +- Firefox110以下はサポートされなくなりました #### For app developers - API: metaのレスポンスに`emojis`プロパティが含まれなくなりました From 98469117bf4bbf04f25b9d4db02561f32a493a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=93=E3=81=91=E3=81=A3=E3=81=A1?= <50144466+sim1222@users.noreply.github.com> Date: Sat, 14 Jan 2023 06:18:58 +0900 Subject: [PATCH 2/3] fix: follow request list api pagination (#9548) * fix: follow request list api pagination * fix: improve alias Co-authored-by: syuilo Co-authored-by: syuilo --- .../api/endpoints/following/requests/list.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/following/requests/list.ts b/packages/backend/src/server/api/endpoints/following/requests/list.ts index 5b11633e6f..f581023e2e 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/list.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/list.ts @@ -1,5 +1,6 @@ import { Inject, Injectable } from '@nestjs/common'; import { Endpoint } from '@/server/api/endpoint-base.js'; +import { QueryService } from '@/core/QueryService.js'; import type { FollowRequestsRepository } from '@/models/index.js'; import { FollowRequestEntityService } from '@/core/entities/FollowRequestEntityService.js'; import { DI } from '@/di-symbols.js'; @@ -40,7 +41,11 @@ export const meta = { export const paramDef = { type: 'object', - properties: {}, + properties: { + sinceId: { type: 'string', format: 'misskey:id' }, + untilId: { type: 'string', format: 'misskey:id' }, + limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, + }, required: [], } as const; @@ -52,13 +57,16 @@ export default class extends Endpoint { private followRequestsRepository: FollowRequestsRepository, private followRequestEntityService: FollowRequestEntityService, + private queryService: QueryService, ) { super(meta, paramDef, async (ps, me) => { - const reqs = await this.followRequestsRepository.findBy({ - followeeId: me.id, - }); + const query = this.queryService.makePaginationQuery(this.followRequestsRepository.createQueryBuilder('request'), ps.sinceId, ps.untilId); - return await Promise.all(reqs.map(req => this.followRequestEntityService.pack(req))); + const requests = await query + .take(ps.limit) + .getMany(); + + return await Promise.all(requests.map(req => this.followRequestEntityService.pack(req))); }); } } From e6a76b31be85182022bbef3eb1261f0be9f021c4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 14 Jan 2023 06:26:06 +0900 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7a789f9ab..bdb919b65b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -129,6 +129,7 @@ You should also include the user name that made the change. - Server: 特定のPNG画像のアップロードに失敗する問題を修正 @usbharu - Server: 非公開のクリップのURLでOGPレンダリングされる問題を修正 @syuilo - Server: アンテナタイムライン(ストリーミング)が、フォローしていないユーザーの鍵投稿も拾ってしまう @syuilo +- Server: follow request list api pagination @sim1222 - Client: パスワードマネージャーなどでユーザー名がオートコンプリートされない問題を修正 @massongit - Client: 日付形式の文字列などがカスタム絵文字として表示されるのを修正 @syuilo - Client: case insensitive emoji search @saschanaz