fix: クエリキャッシュ無効化時の絵文字操作エラーを解消 (#10320)
* disabledCache: trueのときにqueryResultCacheへアクセスしないように * append changelog
This commit is contained in:
		| @@ -53,7 +53,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
| 				}); | ||||
| 			} | ||||
|  | ||||
| 			await this.db.queryResultCache!.remove(['meta_emojis']); | ||||
| 			await this.db.queryResultCache?.remove(['meta_emojis']); | ||||
|  | ||||
| 			this.globalEventService.publishBroadcastStream('emojiUpdated', { | ||||
| 				emojis: await this.emojiEntityService.packDetailedMany(ps.ids), | ||||
|   | ||||
| @@ -89,7 +89,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
| 				type: driveFile.webpublicType ?? driveFile.type, | ||||
| 			}).then(x => this.emojisRepository.findOneByOrFail(x.identifiers[0])); | ||||
|  | ||||
| 			await this.db.queryResultCache!.remove(['meta_emojis']); | ||||
| 			await this.db.queryResultCache?.remove(['meta_emojis']); | ||||
|  | ||||
| 			this.globalEventService.publishBroadcastStream('emojiAdded', { | ||||
| 				emoji: await this.emojiEntityService.packDetailed(copied.id), | ||||
|   | ||||
| @@ -47,7 +47,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
|  | ||||
| 			for (const emoji of emojis) { | ||||
| 				await this.emojisRepository.delete(emoji.id); | ||||
| 				await this.db.queryResultCache!.remove(['meta_emojis']); | ||||
| 				await this.db.queryResultCache?.remove(['meta_emojis']); | ||||
| 				this.moderationLogService.insertModerationLog(me, 'deleteEmoji', { | ||||
| 					emoji: emoji, | ||||
| 				}); | ||||
|   | ||||
| @@ -54,7 +54,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
|  | ||||
| 			await this.emojisRepository.delete(emoji.id); | ||||
|  | ||||
| 			await this.db.queryResultCache!.remove(['meta_emojis']); | ||||
| 			await this.db.queryResultCache?.remove(['meta_emojis']); | ||||
|  | ||||
| 			this.globalEventService.publishBroadcastStream('emojiDeleted', { | ||||
| 				emojis: [await this.emojiEntityService.packDetailed(emoji)], | ||||
|   | ||||
| @@ -53,7 +53,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
| 				}); | ||||
| 			} | ||||
|  | ||||
| 			await this.db.queryResultCache!.remove(['meta_emojis']); | ||||
| 			await this.db.queryResultCache?.remove(['meta_emojis']); | ||||
| 		 | ||||
| 			this.globalEventService.publishBroadcastStream('emojiUpdated', { | ||||
| 				emojis: await this.emojiEntityService.packDetailedMany(ps.ids), | ||||
|   | ||||
| @@ -49,7 +49,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
| 				aliases: ps.aliases, | ||||
| 			}); | ||||
|  | ||||
| 			await this.db.queryResultCache!.remove(['meta_emojis']); | ||||
| 			await this.db.queryResultCache?.remove(['meta_emojis']); | ||||
|  | ||||
| 			this.globalEventService.publishBroadcastStream('emojiUpdated', { | ||||
| 				emojis: await this.emojiEntityService.packDetailedMany(ps.ids), | ||||
|   | ||||
| @@ -51,7 +51,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
| 				category: ps.category, | ||||
| 			}); | ||||
|  | ||||
| 			await this.db.queryResultCache!.remove(['meta_emojis']); | ||||
| 			await this.db.queryResultCache?.remove(['meta_emojis']); | ||||
|  | ||||
| 			this.globalEventService.publishBroadcastStream('emojiUpdated', { | ||||
| 				emojis: await this.emojiEntityService.packDetailedMany(ps.ids), | ||||
|   | ||||
| @@ -66,7 +66,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
| 				aliases: ps.aliases, | ||||
| 			}); | ||||
|  | ||||
| 			await this.db.queryResultCache!.remove(['meta_emojis']); | ||||
| 			await this.db.queryResultCache?.remove(['meta_emojis']); | ||||
|  | ||||
| 			const updated = await this.emojiEntityService.packDetailed(emoji.id); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 YS
					YS