Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop
This commit is contained in:
		
						commit
						39c058a4bb
					
				
					 2 changed files with 15 additions and 6 deletions
				
			
		|  | @ -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の変更点についてはこちら https://github.com/syuilo/aiscript/blob/master/CHANGELOG.md#0120 | ||||||
| 	- 0.12.x未満のプラグインは読み込むことはできません | 	- 0.12.x未満のプラグインは読み込むことはできません | ||||||
| - iOS15以下のデバイスはサポートされなくなりました | - iOS15以下のデバイスはサポートされなくなりました | ||||||
| - Firefox109以下はサポートされなくなりました | - Firefox110以下はサポートされなくなりました | ||||||
| 
 | 
 | ||||||
| #### For app developers | #### For app developers | ||||||
| - API: metaのレスポンスに`emojis`プロパティが含まれなくなりました | - API: metaのレスポンスに`emojis`プロパティが含まれなくなりました | ||||||
|  | @ -130,6 +130,7 @@ You should also include the user name that made the change. | ||||||
| - Server: 特定のPNG画像のアップロードに失敗する問題を修正 @usbharu | - Server: 特定のPNG画像のアップロードに失敗する問題を修正 @usbharu | ||||||
| - Server: 非公開のクリップのURLでOGPレンダリングされる問題を修正 @syuilo | - Server: 非公開のクリップのURLでOGPレンダリングされる問題を修正 @syuilo | ||||||
| - Server: アンテナタイムライン(ストリーミング)が、フォローしていないユーザーの鍵投稿も拾ってしまう @syuilo | - Server: アンテナタイムライン(ストリーミング)が、フォローしていないユーザーの鍵投稿も拾ってしまう @syuilo | ||||||
|  | - Server: follow request list api pagination @sim1222 | ||||||
| - Client: パスワードマネージャーなどでユーザー名がオートコンプリートされない問題を修正 @massongit | - Client: パスワードマネージャーなどでユーザー名がオートコンプリートされない問題を修正 @massongit | ||||||
| - Client: 日付形式の文字列などがカスタム絵文字として表示されるのを修正 @syuilo | - Client: 日付形式の文字列などがカスタム絵文字として表示されるのを修正 @syuilo | ||||||
| - Client: case insensitive emoji search @saschanaz | - Client: case insensitive emoji search @saschanaz | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| import { Inject, Injectable } from '@nestjs/common'; | import { Inject, Injectable } from '@nestjs/common'; | ||||||
| import { Endpoint } from '@/server/api/endpoint-base.js'; | import { Endpoint } from '@/server/api/endpoint-base.js'; | ||||||
|  | import { QueryService } from '@/core/QueryService.js'; | ||||||
| import type { FollowRequestsRepository } from '@/models/index.js'; | import type { FollowRequestsRepository } from '@/models/index.js'; | ||||||
| import { FollowRequestEntityService } from '@/core/entities/FollowRequestEntityService.js'; | import { FollowRequestEntityService } from '@/core/entities/FollowRequestEntityService.js'; | ||||||
| import { DI } from '@/di-symbols.js'; | import { DI } from '@/di-symbols.js'; | ||||||
|  | @ -40,7 +41,11 @@ export const meta = { | ||||||
| 
 | 
 | ||||||
| export const paramDef = { | export const paramDef = { | ||||||
| 	type: 'object', | 	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: [], | 	required: [], | ||||||
| } as const; | } as const; | ||||||
| 
 | 
 | ||||||
|  | @ -52,13 +57,16 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||||
| 		private followRequestsRepository: FollowRequestsRepository, | 		private followRequestsRepository: FollowRequestsRepository, | ||||||
| 
 | 
 | ||||||
| 		private followRequestEntityService: FollowRequestEntityService, | 		private followRequestEntityService: FollowRequestEntityService, | ||||||
|  | 		private queryService: QueryService, | ||||||
| 	) { | 	) { | ||||||
| 		super(meta, paramDef, async (ps, me) => { | 		super(meta, paramDef, async (ps, me) => { | ||||||
| 			const reqs = await this.followRequestsRepository.findBy({ | 			const query = this.queryService.makePaginationQuery(this.followRequestsRepository.createQueryBuilder('request'), ps.sinceId, ps.untilId); | ||||||
| 				followeeId: me.id, |  | ||||||
| 			}); |  | ||||||
| 
 | 
 | ||||||
| 			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))); | ||||||
| 		}); | 		}); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue