forked from mirrors/misskey
fix(chart): PerUserDriveChart.update で userId が null のシステム所有ファイルをスキップ (#17499)
fix(chart): PerUserDriveChart.update で userId が null のシステム所有ファイルをスキップ (#17498) Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
parent
2e1594245b
commit
3246dad53e
2 changed files with 5 additions and 0 deletions
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
### Server
|
||||
- Enhance: リモートノートクリーニングジョブのスキップ処理のパフォーマンス改善
|
||||
- Fix: PerUserDriveChart がシステム所有ファイル (userId が null) の更新で `"group"` の非NULL制約違反によりクラッシュする問題を修正 (#17498)
|
||||
- Enhance: リモートノートクリーニングジョブの削除対象検索処理のパフォーマンス改善
|
||||
- Fix: センシティブメディア自動検出周りの依存関係・ファイルの解決に失敗する問題を修正
|
||||
- Fix: フォロワー限定投稿を指名投稿で引用した際に、引用した投稿の公開範囲が意図せず変更される問題を修正
|
||||
|
|
|
|||
|
|
@ -56,6 +56,10 @@ export default class PerUserDriveChart extends Chart<typeof schema> { // eslint-
|
|||
|
||||
@bindThis
|
||||
public async update(file: MiDriveFile, isAdditional: boolean): Promise<void> {
|
||||
// MiDriveFile.userId is nullable (system-owned files such as the instance
|
||||
// icon/banner, fetched system avatars, custom emoji image uploads, etc.).
|
||||
// Per-user drive accounting is not defined for ownerless files, so skip.
|
||||
if (file.userId == null) return;
|
||||
const fileSizeKb = file.size / 1000;
|
||||
await this.commit({
|
||||
'totalCount': isAdditional ? 1 : -1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue