enhance: リモートユーザーのロールバッジを表示するかどうかをサーバー管理者が設定できるように (#16661)

* enhance: リモートユーザーのロールバッジを表示するかどうかをサーバー管理者が設定できるように

* Update Changelog

* build misskey-js with types
This commit is contained in:
かっこかり
2025-10-16 22:45:37 +09:00
committed by GitHub
parent b6bf3cfcb7
commit 29892d2a01
10 changed files with 60 additions and 2 deletions

View File

@@ -593,6 +593,10 @@ export const meta = {
type: 'number',
optional: false, nullable: false,
},
showRoleBadgesOfRemoteUsers: {
type: 'boolean',
optional: false, nullable: false,
},
},
},
} as const;
@@ -748,6 +752,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
enableRemoteNotesCleaning: instance.enableRemoteNotesCleaning,
remoteNotesCleaningExpiryDaysForEachNotes: instance.remoteNotesCleaningExpiryDaysForEachNotes,
remoteNotesCleaningMaxProcessingDurationInMinutes: instance.remoteNotesCleaningMaxProcessingDurationInMinutes,
showRoleBadgesOfRemoteUsers: instance.showRoleBadgesOfRemoteUsers,
};
});
}

View File

@@ -209,6 +209,7 @@ export const paramDef = {
enableRemoteNotesCleaning: { type: 'boolean' },
remoteNotesCleaningExpiryDaysForEachNotes: { type: 'number' },
remoteNotesCleaningMaxProcessingDurationInMinutes: { type: 'number' },
showRoleBadgesOfRemoteUsers: { type: 'boolean' },
},
required: [],
} as const;
@@ -743,6 +744,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
set.remoteNotesCleaningMaxProcessingDurationInMinutes = ps.remoteNotesCleaningMaxProcessingDurationInMinutes;
}
if (ps.showRoleBadgesOfRemoteUsers !== undefined) {
set.showRoleBadgesOfRemoteUsers = ps.showRoleBadgesOfRemoteUsers;
}
const before = await this.metaService.fetch(true);
await this.metaService.update(set);