mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-22 11:25:13 +00:00
fix(backend): ベースロールのポリシー変更時モデレーションログが残るように (#14418)
* fix(policies): ベースロールのポリシー変更時モデレーションログが残るように (MisskeyIO#700) (cherry picked from commit 80389a914049f6f26237fde8da7d4e1bd41452fc) * Update Changelog --------- Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com>
This commit is contained in:
parent
059eb6d379
commit
06684fe49b
2 changed files with 15 additions and 2 deletions
|
@ -28,6 +28,8 @@
|
||||||
- キュー処理のつまりが改善される可能性があります
|
- キュー処理のつまりが改善される可能性があります
|
||||||
- Fix: リバーシの対局設定の変更が反映されないのを修正
|
- Fix: リバーシの対局設定の変更が反映されないのを修正
|
||||||
- Fix: 無制限にストリーミングのチャンネルに接続できる問題を修正
|
- Fix: 無制限にストリーミングのチャンネルに接続できる問題を修正
|
||||||
|
- Fix: ベースロールのポリシーを変更した際にモデログに記録されないのを修正
|
||||||
|
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/700)
|
||||||
|
|
||||||
## 2024.7.0
|
## 2024.7.0
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { Injectable } from '@nestjs/common';
|
||||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||||
import { MetaService } from '@/core/MetaService.js';
|
import { MetaService } from '@/core/MetaService.js';
|
||||||
|
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin', 'role'],
|
tags: ['admin', 'role'],
|
||||||
|
@ -33,12 +34,22 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
constructor(
|
constructor(
|
||||||
private metaService: MetaService,
|
private metaService: MetaService,
|
||||||
private globalEventService: GlobalEventService,
|
private globalEventService: GlobalEventService,
|
||||||
|
private moderationLogService: ModerationLogService,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
|
const before = await this.metaService.fetch(true);
|
||||||
|
|
||||||
await this.metaService.update({
|
await this.metaService.update({
|
||||||
policies: ps.policies,
|
policies: ps.policies,
|
||||||
});
|
});
|
||||||
this.globalEventService.publishInternalEvent('policiesUpdated', ps.policies);
|
|
||||||
|
const after = await this.metaService.fetch(true);
|
||||||
|
|
||||||
|
this.globalEventService.publishInternalEvent('policiesUpdated', after.policies);
|
||||||
|
this.moderationLogService.log(me, 'updateServerSettings', {
|
||||||
|
before: before.policies,
|
||||||
|
after: after.policies,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue