mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 05:36:06 +00:00
better document consequence.ts
This commit is contained in:
parent
2b60f6addd
commit
5aaf05265b
@ -1,18 +1,23 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
* Distinct individual actions that can be caused as a result of detected abuse
|
||||||
|
*/
|
||||||
export enum ConsequenceType {
|
export enum ConsequenceType {
|
||||||
|
// effectively a no-op. just tell the management room
|
||||||
alert,
|
alert,
|
||||||
|
// redact the event that triggered this consequence
|
||||||
redact,
|
redact,
|
||||||
|
// ban the user that sent the event that triggered this consequence
|
||||||
ban
|
ban
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Consequence {
|
export class Consequence {
|
||||||
/*
|
/*
|
||||||
* A description of an action to take when a protection detects abuse
|
* Action to take upon detection of abuse and an optional explanation of the detection
|
||||||
*
|
*
|
||||||
* @param type Action to take
|
* @param type Action to take
|
||||||
* @param reason Brief explanation of why we're taking an action, printed to management room.
|
* @param reason Brief explanation of why we're taking an action, printed to management room.
|
||||||
* this wil be HTML escaped before printing, just in case it has user-provided data
|
* this will be HTML escaped before printing, just in case it has user-provided data
|
||||||
*/
|
*/
|
||||||
constructor(public readonly type: ConsequenceType, public readonly reason?: string) {}
|
constructor(public readonly type: ConsequenceType, public readonly reason?: string) {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user