forked from imksoo/mastodon-spam-detector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add additional actions that can be taken depending on the configuration of the signature (Limit / Silence) - Add DISABLE_SEND_REPORTS, DISABLE_SUSPEND_ACCOUNTS, DISABLE_LIMIT_ACCOUNTS to allow fully disabling signatures from taking certain actions - Add DISABLE_SIGNATURES to allow others to opt-out of using certain signature rules
- Loading branch information
Showing
6 changed files
with
97 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
BASE_URL=https://your_base_url | ||
ACCESS_TOKEN=your_access_token | ||
LOG_DEBUG=false | ||
LOG_INFO=true | ||
LOG_INFO=true | ||
|
||
DISABLE_SEND_REPORTS=false | ||
DISABLE_SUSPEND_ACCOUNTS=false | ||
DISABLE_LIMIT_ACCOUNTS=false | ||
|
||
# If you want to disable certain signatures, you can do so by uncommenting this line | ||
# and adding the signatures you want to disable. For example: | ||
# DISABLE_SIGNATURES=signature1,signature2 | ||
#DISABLE_SIGNATURES= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import masto from "masto"; | ||
|
||
export interface SignatureDefinition { | ||
check: (status: masto.mastodon.streaming.UpdateEvent['payload']) => SignatureResponse; | ||
signatureName: string; | ||
} | ||
|
||
export interface SignatureResponse { | ||
isSpam: boolean; | ||
reason?: string; | ||
actions: { | ||
sendReport?: boolean; | ||
limitAccount?: boolean; | ||
suspendAccount?: boolean; | ||
} | ||
} |