feat: sensitive channel (#11438)
* feat(backend): add isSensitive to Channel * feat(backend): support isSensitive in channel endpoints * feat(frontend/channel-editor): support isSensitive in create/edit channel page * feat(frontend/channel): show sensitive indicator for sensitive channels * docs(changelog): add チャンネルをセンシティブ指定できるようになりました * chore: license header for each file * chore: add isSensitive of channel to Note object
This commit is contained in:
@@ -49,6 +49,7 @@ export const paramDef = {
|
||||
description: { type: 'string', nullable: true, minLength: 1, maxLength: 2048 },
|
||||
bannerId: { type: 'string', format: 'misskey:id', nullable: true },
|
||||
color: { type: 'string', minLength: 1, maxLength: 16 },
|
||||
isSensitive: { type: 'boolean', nullable: true },
|
||||
},
|
||||
required: ['name'],
|
||||
} as const;
|
||||
@@ -86,6 +87,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||
name: ps.name,
|
||||
description: ps.description ?? null,
|
||||
bannerId: banner ? banner.id : null,
|
||||
isSensitive: ps.isSensitive ?? false,
|
||||
...(ps.color !== undefined ? { color: ps.color } : {}),
|
||||
} as Channel).then(x => this.channelsRepository.findOneByOrFail(x.identifiers[0]));
|
||||
|
||||
|
Reference in New Issue
Block a user