implement mandatory CW for notes (resolves #910)

This commit is contained in:
Hazelnoot 2025-06-27 22:32:26 -04:00
parent 6f8d831e09
commit 92750240eb
29 changed files with 305 additions and 11 deletions

View file

@ -228,6 +228,15 @@ export class MiNote {
})
public processErrors: string[] | null;
/**
* Specifies a Content Warning that should be forcibly attached to this note.
* Does not replace the user's own CW.
*/
@Column('text', {
nullable: true,
})
public mandatoryCW: string | null;
//#region Denormalized fields
@Column('varchar', {
length: 128, nullable: true,

View file

@ -41,6 +41,10 @@ export const packedNoteSchema = {
type: 'string',
optional: true, nullable: true,
},
mandatoryCW: {
type: 'string',
optional: true, nullable: true,
},
userId: {
type: 'string',
optional: false, nullable: false,