fix: クエリキャッシュ無効化時の絵文字操作エラーを解消 (#10320)

* disabledCache: trueのときにqueryResultCacheへアクセスしないように

* append changelog
This commit is contained in:
YS 2023-03-14 09:37:14 +09:00 committed by GitHub
parent 850addc619
commit 3cb669a852
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 10 additions and 9 deletions

View file

@ -39,6 +39,7 @@ You should also include the user name that made the change.
- AWS S3からのファイル削除でNoSuchKeyエラーが出ると進めらない状態になる問題を修正 - AWS S3からのファイル削除でNoSuchKeyエラーが出ると進めらない状態になる問題を修正
- fix(frontend): Safariでプラグインが複数ある場合に正常に読み込まれない問題を修正 - fix(frontend): Safariでプラグインが複数ある場合に正常に読み込まれない問題を修正
- Bookwyrmのユーザーのプロフィールページで「リモートで表示」をタップしても反応がない問題を修正 - Bookwyrmのユーザーのプロフィールページで「リモートで表示」をタップしても反応がない問題を修正
- `disableCache: true`を設定している場合に絵文字管理操作でエラーが出る問題を修正
## 13.9.2 (2023/03/06) ## 13.9.2 (2023/03/06)

View file

@ -58,7 +58,7 @@ export class CustomEmojiService {
}).then(x => this.emojisRepository.findOneByOrFail(x.identifiers[0])); }).then(x => this.emojisRepository.findOneByOrFail(x.identifiers[0]));
if (data.host == null) { if (data.host == null) {
await this.db.queryResultCache!.remove(['meta_emojis']); await this.db.queryResultCache?.remove(['meta_emojis']);
this.globalEventService.publishBroadcastStream('emojiAdded', { this.globalEventService.publishBroadcastStream('emojiAdded', {
emoji: await this.emojiEntityService.packDetailed(emoji.id), emoji: await this.emojiEntityService.packDetailed(emoji.id),

View file

@ -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', { this.globalEventService.publishBroadcastStream('emojiUpdated', {
emojis: await this.emojiEntityService.packDetailedMany(ps.ids), emojis: await this.emojiEntityService.packDetailedMany(ps.ids),

View file

@ -89,7 +89,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
type: driveFile.webpublicType ?? driveFile.type, type: driveFile.webpublicType ?? driveFile.type,
}).then(x => this.emojisRepository.findOneByOrFail(x.identifiers[0])); }).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', { this.globalEventService.publishBroadcastStream('emojiAdded', {
emoji: await this.emojiEntityService.packDetailed(copied.id), emoji: await this.emojiEntityService.packDetailed(copied.id),

View file

@ -47,7 +47,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
for (const emoji of emojis) { for (const emoji of emojis) {
await this.emojisRepository.delete(emoji.id); 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', { this.moderationLogService.insertModerationLog(me, 'deleteEmoji', {
emoji: emoji, emoji: emoji,
}); });

View file

@ -54,7 +54,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
await this.emojisRepository.delete(emoji.id); await this.emojisRepository.delete(emoji.id);
await this.db.queryResultCache!.remove(['meta_emojis']); await this.db.queryResultCache?.remove(['meta_emojis']);
this.globalEventService.publishBroadcastStream('emojiDeleted', { this.globalEventService.publishBroadcastStream('emojiDeleted', {
emojis: [await this.emojiEntityService.packDetailed(emoji)], emojis: [await this.emojiEntityService.packDetailed(emoji)],

View file

@ -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', { this.globalEventService.publishBroadcastStream('emojiUpdated', {
emojis: await this.emojiEntityService.packDetailedMany(ps.ids), emojis: await this.emojiEntityService.packDetailedMany(ps.ids),

View file

@ -49,7 +49,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
aliases: ps.aliases, aliases: ps.aliases,
}); });
await this.db.queryResultCache!.remove(['meta_emojis']); await this.db.queryResultCache?.remove(['meta_emojis']);
this.globalEventService.publishBroadcastStream('emojiUpdated', { this.globalEventService.publishBroadcastStream('emojiUpdated', {
emojis: await this.emojiEntityService.packDetailedMany(ps.ids), emojis: await this.emojiEntityService.packDetailedMany(ps.ids),

View file

@ -51,7 +51,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
category: ps.category, category: ps.category,
}); });
await this.db.queryResultCache!.remove(['meta_emojis']); await this.db.queryResultCache?.remove(['meta_emojis']);
this.globalEventService.publishBroadcastStream('emojiUpdated', { this.globalEventService.publishBroadcastStream('emojiUpdated', {
emojis: await this.emojiEntityService.packDetailedMany(ps.ids), emojis: await this.emojiEntityService.packDetailedMany(ps.ids),

View file

@ -66,7 +66,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
aliases: ps.aliases, 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); const updated = await this.emojiEntityService.packDetailed(emoji.id);