Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop
This commit is contained in:
		
						commit
						b434beb5e2
					
				|  | @ -22,6 +22,7 @@ | |||
| 	- お知らせのアイコンを設定可能に | ||||
| - チャンネルをセンシティブ指定できるようになりました | ||||
| 	- センシティブチャンネルのNoteのReNoteはデフォルトでHome TLに流れるようになりました | ||||
| 	- センシティブチャンネルのノートはユーザープロフィールに表示されません | ||||
| - 二要素認証のバックアップコードが生成されるようになりました ref. https://github.com/MisskeyIO/misskey/pull/121 | ||||
| - 二要素認証でパスキーをサポートするようになりました | ||||
| 
 | ||||
|  | @ -51,13 +52,14 @@ | |||
| - Fix: 他のサーバーのユーザーへ「メッセージを送信」した時の初期テキストのメンションが間違っている問題を修正 | ||||
| 
 | ||||
| ### Server | ||||
| - Fix: ノート検索 `notes/search` にてhostを指定した際に検索結果に反映されるように | ||||
| - cacheRemoteFilesの初期値はfalseになりました | ||||
| - ファイルアップロード時等にファイル名の拡張子を修正する関数(correctFilename)の挙動を改善 | ||||
| - Webhookのペイロードにサーバーのurlが含まれるようになりました | ||||
| - Webhook設定でsecretを空に出来るように | ||||
| - 使われていないアンテナの自動停止を設定可能に | ||||
| - nodeinfo 2.1対応 | ||||
| - 自分へのメンション一覧を取得する際のパフォーマンスを向上 | ||||
| - Fix: ノート検索 `notes/search` にてhostを指定した際に検索結果に反映されるように | ||||
| - Fix: 一部のfeatured noteを照会できない問題を修正 | ||||
| - Fix: muteがapiからのuser list timeline取得で機能しない問題を修正 | ||||
| - Fix: ジョブキュー管理画面の認証を回避できる問題を修正 | ||||
|  |  | |||
|  | @ -35,10 +35,10 @@ export class NodeinfoServerService { | |||
| 
 | ||||
| 	@bindThis | ||||
| 	public getLinks() { | ||||
| 		return [/* (awaiting release) { | ||||
| 			rel: 'http://nodeinfo.diaspora.software/ns/schema/2.1', | ||||
| 			href: config.url + nodeinfo2_1path | ||||
| 		}, */{ | ||||
| 		return [{ | ||||
| 				rel: 'http://nodeinfo.diaspora.software/ns/schema/2.1', | ||||
| 				href: this.config.url + nodeinfo2_1path | ||||
| 			}, { | ||||
| 				rel: 'http://nodeinfo.diaspora.software/ns/schema/2.0', | ||||
| 				href: this.config.url + nodeinfo2_0path, | ||||
| 			}]; | ||||
|  | @ -46,7 +46,7 @@ export class NodeinfoServerService { | |||
| 
 | ||||
| 	@bindThis | ||||
| 	public createServer(fastify: FastifyInstance, options: FastifyPluginOptions, done: (err?: Error) => void) { | ||||
| 		const nodeinfo2 = async () => { | ||||
| 		const nodeinfo2 = async (version: number) => { | ||||
| 			const now = Date.now(); | ||||
| 
 | ||||
| 			const notesChart = await this.notesChart.getChart('hour', 1, null); | ||||
|  | @ -73,11 +73,11 @@ export class NodeinfoServerService { | |||
| 
 | ||||
| 			const basePolicies = { ...DEFAULT_POLICIES, ...meta.policies }; | ||||
| 
 | ||||
| 			return { | ||||
| 			// eslint-disable-next-line @typescript-eslint/no-explicit-any
 | ||||
| 			const document: any = { | ||||
| 				software: { | ||||
| 					name: 'misskey', | ||||
| 					version: this.config.version, | ||||
| 					repository: meta.repositoryUrl, | ||||
| 				}, | ||||
| 				protocols: ['activitypub'], | ||||
| 				services: { | ||||
|  | @ -114,23 +114,36 @@ export class NodeinfoServerService { | |||
| 					themeColor: meta.themeColor ?? '#86b300', | ||||
| 				}, | ||||
| 			}; | ||||
| 			if (version >= 21) { | ||||
| 				document.software.repository = meta.repositoryUrl; | ||||
| 				document.software.homepage = meta.repositoryUrl; | ||||
| 			} | ||||
| 			return document; | ||||
| 		}; | ||||
| 
 | ||||
| 		const cache = new MemorySingleCache<Awaited<ReturnType<typeof nodeinfo2>>>(1000 * 60 * 10); | ||||
| 
 | ||||
| 		fastify.get(nodeinfo2_1path, async (request, reply) => { | ||||
| 			const base = await cache.fetch(() => nodeinfo2()); | ||||
| 			const base = await cache.fetch(() => nodeinfo2(21)); | ||||
| 
 | ||||
| 			reply.header('Cache-Control', 'public, max-age=600'); | ||||
| 			reply | ||||
| 				.type( | ||||
| 					'application/json; profile="http://nodeinfo.diaspora.software/ns/schema/2.1#"', | ||||
| 				) | ||||
| 				.header('Cache-Control', 'public, max-age=600'); | ||||
| 			return { version: '2.1', ...base }; | ||||
| 		}); | ||||
| 
 | ||||
| 		fastify.get(nodeinfo2_0path, async (request, reply) => { | ||||
| 			const base = await cache.fetch(() => nodeinfo2()); | ||||
| 			const base = await cache.fetch(() => nodeinfo2(20)); | ||||
| 
 | ||||
| 			delete (base as any).software.repository; | ||||
| 
 | ||||
| 			reply.header('Cache-Control', 'public, max-age=600'); | ||||
| 			reply | ||||
| 				.type( | ||||
| 					'application/json; profile="http://nodeinfo.diaspora.software/ns/schema/2.0#"', | ||||
| 				) | ||||
| 				.header('Cache-Control', 'public, max-age=600'); | ||||
| 			return { version: '2.0', ...base }; | ||||
| 		}); | ||||
| 
 | ||||
|  |  | |||
|  | @ -80,9 +80,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- | |||
| 				.innerJoinAndSelect('note.user', 'user') | ||||
| 				.leftJoinAndSelect('note.reply', 'reply') | ||||
| 				.leftJoinAndSelect('note.renote', 'renote') | ||||
| 				.leftJoinAndSelect('note.channel', 'channel') | ||||
| 				.leftJoinAndSelect('reply.user', 'replyUser') | ||||
| 				.leftJoinAndSelect('renote.user', 'renoteUser'); | ||||
| 
 | ||||
| 			query.andWhere('channel.isSensitive = false'); | ||||
| 
 | ||||
| 			this.queryService.generateVisibilityQuery(query, me); | ||||
| 			if (me) { | ||||
| 				this.queryService.generateMutedUserQuery(query, me, user); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue