Sorted Domain Keywords to new Policy Function. +1 Keyword Ban

main
SleepingCrows 2024-06-22 17:12:42 -04:00
parent 7720d63531
commit 616d76b104
1 changed files with 11 additions and 6 deletions

View File

@ -6,19 +6,24 @@ const kv = await Deno.openKv();
export default class AppPolicy implements NPolicy { export default class AppPolicy implements NPolicy {
async call(event: NostrEvent): Promise<NostrRelayOK> { async call(event: NostrEvent): Promise<NostrRelayOK> {
const policy = new PipePolicy([ const policy = new PipePolicy([
new KeywordPolicy([
'NSFW sexual content',
':nsfw:',
'nsfw 18+ Sexual',
':role_nsfw:']),
/* Domain Keyword Bans */
new KeywordPolicy([ new KeywordPolicy([
'bae.st/media', 'bae.st/media',
'scrolller.com/', 'scrolller.com/',
'media.shota.house/', 'media.shota.house/',
'1img.99img.biz/', '1img.99img.biz/',
'assets.bonito.cafe/', 'assets.bonito.cafe/',
'naughtymag.com/', 'redgifs.com/watch',
'nsfw 18+ Sexual', 'naughtymag.com/'
'NSFW sexual content', ]),
':nsfw:', /* Porn/Sex Hashtags */
':role_nsfw:']),
new HashtagPolicy([ new HashtagPolicy([
'adult', 'adult', /* May give false positives? */
'ass', 'ass',
'assworship', 'assworship',
'boobs', 'boobs',