merge: Add "force content warning" setting for user moderation (resolves #905) (!876)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/876

Closes #905

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
dakkar 2025-02-20 10:20:49 +00:00
commit 534c35cca2
46 changed files with 843 additions and 108 deletions

View file

@ -339,6 +339,15 @@ export class MiUser {
})
public enableRss: boolean;
/**
* Specifies a Content Warning that should be forcibly applied to all notes by this user.
* If null (default), then no Content Warning is applied.
*/
@Column('text', {
nullable: true,
})
public mandatoryCW: string | null;
constructor(data: Partial<MiUser>) {
if (data == null) return;

View file

@ -134,6 +134,10 @@ export const packedUserLiteSchema = {
type: 'boolean',
nullable: false, optional: false,
},
mandatoryCW: {
type: 'string',
nullable: true, optional: false,
},
isBot: {
type: 'boolean',
nullable: false, optional: true,