add mandatory CW for instances

This commit is contained in:
Hazelnoot 2025-06-27 23:20:59 -04:00
parent 595c004a74
commit 5e0115335a
26 changed files with 282 additions and 8 deletions

View file

@ -228,4 +228,13 @@ export class MiInstance {
length: 16384, default: '',
})
public moderationNote: string;
/**
* Specifies a Content Warning that should be forcibly applied to all notes from this instance
* If null (default), then no Content Warning is applied.
*/
@Column('text', {
nullable: true,
})
public mandatoryCW: string | null;
}

View file

@ -139,5 +139,9 @@ export const packedFederationInstanceSchema = {
type: 'boolean',
optional: false, nullable: false,
},
mandatoryCW: {
type: 'string',
optional: false, nullable: true,
},
},
} as const;

View file

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