2024-06-18 22:02:54 -04:00
|
|
|
import { NPolicy, NostrEvent, NostrRelayOK } from '@nostrify/nostrify';
|
|
|
|
import { AntiDuplicationPolicy, HashtagPolicy, PubkeyBanPolicy, KeywordPolicy, PipePolicy } from '@nostrify/nostrify/policies';
|
|
|
|
|
|
|
|
const kv = await Deno.openKv();
|
|
|
|
|
|
|
|
export default class AppPolicy implements NPolicy {
|
|
|
|
async call(event: NostrEvent): Promise<NostrRelayOK> {
|
|
|
|
const policy = new PipePolicy([
|
|
|
|
new KeywordPolicy([
|
|
|
|
'bae.st/media']),
|
|
|
|
new HashtagPolicy([
|
|
|
|
'adult',
|
|
|
|
'ass',
|
|
|
|
'assworship',
|
|
|
|
'boobs',
|
|
|
|
'boobies',
|
|
|
|
'butt',
|
|
|
|
'cock',
|
|
|
|
'dick',
|
|
|
|
'dickpic',
|
|
|
|
'explosionloli',
|
|
|
|
'femboi',
|
|
|
|
'femboy',
|
|
|
|
'fetish',
|
|
|
|
'fuck',
|
|
|
|
'freeporn',
|
|
|
|
'girls',
|
|
|
|
'loli',
|
|
|
|
'milf',
|
|
|
|
'nude',
|
|
|
|
'nudity',
|
|
|
|
'pantsu',
|
|
|
|
'pussy',
|
|
|
|
'porn',
|
|
|
|
'porno',
|
|
|
|
'porntube',
|
|
|
|
'pornvideo',
|
|
|
|
'sex',
|
|
|
|
'sexpervertsyndicate',
|
|
|
|
'sexporn',
|
|
|
|
'sexy',
|
|
|
|
'slut',
|
|
|
|
'teen',
|
|
|
|
'tits',
|
|
|
|
'teenporn',
|
|
|
|
'teens',
|
|
|
|
'transnsfw',
|
|
|
|
'lewd',
|
|
|
|
'sex_from_behind',
|
|
|
|
'sexfrombehind',
|
|
|
|
'bigtits',
|
|
|
|
'nsfw',
|
|
|
|
'xxx',
|
|
|
|
'🔞']),
|
|
|
|
new PubkeyBanPolicy([
|
|
|
|
'0f7512e327a8f92d76d3f1882b1f7504eb18f01d919c6b243108ea32f4e9cb71',
|
|
|
|
'8eea02e8912085962a930b28beed2683a988614de9a339750ae0b3061e2c6db1',
|
|
|
|
'53487c0a7f24a0c7bdc8eda247f445238be65e0f392d62ec570353835c09da54',
|
|
|
|
'044536c57cdcbe174ce23f0154956c95d461931a151a761156b7345ef8c80e46',
|
|
|
|
'3121ef9543850699ca74b7cf74cc953cb24720d1842dbb873f464576a400d46c',
|
|
|
|
'63ddc28c5d48e4c2905432fde55c7981628fbe77060a9e47a9e0b6806081b9d3',
|
|
|
|
'b928b3da189e3f56af889122e50cc4476aeede14838fe13d796c0f05f2e4edd6',
|
|
|
|
'a6faa3d0bf8e3695f247d4dd0ad44f68890c8b0e7ea2997368b8f39f77935564',
|
|
|
|
'9f087435e0e1e35e4d8b7008b28fb718e6ddc9df1e71c3a9f76b72018125dad5',
|
|
|
|
'baa2a1303cf013ad5bebbea306d9705f239f100a915f58c14ef5ce1afb720f7f',
|
|
|
|
'c70dc607cd65443ce2bc9c19832be64f3a49d015dbe1b90b52e5e73d2973249d',
|
|
|
|
'3614633429258eb75592f6acd52baeecf1e95cc09e63a5ece4a28efe4ee8380a',
|
2024-06-19 07:01:07 -04:00
|
|
|
'0dee4ad657fca0fd390553f6c68d108042a0923f7e760fb60b86f0e86f0f478e',
|
2024-06-19 07:37:03 -04:00
|
|
|
'aa0beec08012a3c0310c72607aa785979dad373cda06e7cac32eb34adc3973ab',
|
|
|
|
'1ad25918d203920e3ad3d9af003d2072067fd572bcd723bef43819eb861d07f9',
|
|
|
|
'b9cfef992b4bc95a6fbf01942bd489336dea5890314f9aab408685538083aa48',
|
2024-06-19 07:40:34 -04:00
|
|
|
'0d655124cc6a24382b4e351b72f1906012c39bbecb8e56334f99bb341f137c0d',
|
2024-06-19 07:43:36 -04:00
|
|
|
'61af4200e31501dd5e5335507772ec48948a67c6245f7ba47d1e3e3044dd4d5e',
|
2024-06-18 22:02:54 -04:00
|
|
|
'070df0ac4b1f46bb7450ec04508ef30853f378c6797201ea0ba21930a017704e']),
|
|
|
|
new AntiDuplicationPolicy({ kv, minLength: 50 }),
|
|
|
|
]);
|
|
|
|
|
|
|
|
return policy.call(event);
|
|
|
|
}
|
|
|
|
}
|