enhance: Judge instance block by endsWith (#9263)
* TypeScriptでendsWith * fix * SQL? * バ〜カアホ * Update packages/backend/src/core/UtilityService.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * add comment * add description * Update packages/backend/src/core/UtilityService.ts Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> * Update packages/backend/src/core/chart/charts/federation.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * remove comment * fix * fix? * add changelog * ILIKE, ARRAY Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
		| @@ -139,7 +139,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
| 			} | ||||
|  | ||||
| 			if (Array.isArray(ps.blockedHosts)) { | ||||
| 				set.blockedHosts = ps.blockedHosts.filter(Boolean); | ||||
| 				set.blockedHosts = ps.blockedHosts.filter(Boolean).map(x => x.toLowerCase()); | ||||
| 			} | ||||
|  | ||||
| 			if (ps.themeColor !== undefined) { | ||||
|   | ||||
| @@ -117,7 +117,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
| 	private async fetchAny(uri: string, me: CacheableLocalUser | null | undefined): Promise<SchemaType<typeof meta['res']> | null> { | ||||
| 	// ブロックしてたら中断 | ||||
| 		const fetchedMeta = await this.metaService.fetch(); | ||||
| 		if (fetchedMeta.blockedHosts.includes(this.utilityService.extractDbHost(uri))) return null; | ||||
| 		if (this.utilityService.isBlockedHost(fetchedMeta.blockedHosts, this.utilityService.extractDbHost(uri))) return null; | ||||
|  | ||||
| 		let local = await this.mergePack(me, ...await Promise.all([ | ||||
| 			this.apDbResolverService.getUserFromApId(uri), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 tamaina
					tamaina