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 { const policy = new PipePolicy([ new KeywordPolicy([ 'bae.st/media', 'scrolller.com/', 'media.shota.house/', '1img.99img.biz/', 'assets.bonito.cafe/', 'nsfw 18+ Sexual', 'NSFW sexual content', ':nsfw:', ':role_nsfw:']), new HashtagPolicy([ 'adult', 'ass', 'assworship', 'boobs', 'boobies', 'blowjob', 'butt', 'cock', 'couplefucking', 'dick', 'dickpic', 'explosionloli', 'femboi', 'femboy', 'fetish', 'fuck', 'freeporn', 'girls', 'loli', 'milf', 'nude', 'nudity', 'pantsu', 'pussy', 'porn', 'porno', 'porntube', 'pornvideo', 'pissing', 'sex', 'sexpervertsyndicate', 'sexporn', 'sexy', 'slut', 'teen', 'threesome', 'tits', 'teenporn', 'teens', 'transnsfw', 'lewd', 'shota', 'sex_from_behind', 'sexfrombehind', 'bigtits', 'nsfw', 'xxx', '🔞']), new PubkeyBanPolicy([ '0f7512e327a8f92d76d3f1882b1f7504eb18f01d919c6b243108ea32f4e9cb71', '49c323f9d54aa1f2a120aa33a3ff8a8636b7b2c3473f2c3782f4acf768de4401', 'c3b4ad337ff8859cca9638b370cef2cb30782c185c16d83b7f983a7a18cf425f', '8eea02e8912085962a930b28beed2683a988614de9a339750ae0b3061e2c6db1', '53487c0a7f24a0c7bdc8eda247f445238be65e0f392d62ec570353835c09da54', '044536c57cdcbe174ce23f0154956c95d461931a151a761156b7345ef8c80e46', '3121ef9543850699ca74b7cf74cc953cb24720d1842dbb873f464576a400d46c', '63ddc28c5d48e4c2905432fde55c7981628fbe77060a9e47a9e0b6806081b9d3', 'b928b3da189e3f56af889122e50cc4476aeede14838fe13d796c0f05f2e4edd6', 'a6faa3d0bf8e3695f247d4dd0ad44f68890c8b0e7ea2997368b8f39f77935564', '9f087435e0e1e35e4d8b7008b28fb718e6ddc9df1e71c3a9f76b72018125dad5', 'baa2a1303cf013ad5bebbea306d9705f239f100a915f58c14ef5ce1afb720f7f', 'c70dc607cd65443ce2bc9c19832be64f3a49d015dbe1b90b52e5e73d2973249d', '3614633429258eb75592f6acd52baeecf1e95cc09e63a5ece4a28efe4ee8380a', '0dee4ad657fca0fd390553f6c68d108042a0923f7e760fb60b86f0e86f0f478e', 'aa0beec08012a3c0310c72607aa785979dad373cda06e7cac32eb34adc3973ab', '1ad25918d203920e3ad3d9af003d2072067fd572bcd723bef43819eb861d07f9', 'b9cfef992b4bc95a6fbf01942bd489336dea5890314f9aab408685538083aa48', '0d655124cc6a24382b4e351b72f1906012c39bbecb8e56334f99bb341f137c0d', '61af4200e31501dd5e5335507772ec48948a67c6245f7ba47d1e3e3044dd4d5e', 'a94264ee9eee60a516647bdbf4cde96c870e3a2c50ea0f6de1d463b5e1ef96dd', 'ab248ec288bfb4af685ea91d9836af63317039add93c6687f379c0e802f8a358', '6b929de3cea4cd247b06c462de75b8d9da1ad4f45344a02f92c3ed85ca099746', '8fc01b196c80341451e12bc561d9e394ebcaec5457917c36181c8d6a4a048a2e', '3c5684d95c5097e5880e4c18dd3bb16e9a5157d5644feab99c63c91f9c54aa7b', '06e3db0fc4be1c03ac9fe592b24b8c76fa2353ac63a5318c2c473a6afba41505', 'b0fed405b15d855a6a90d172c95bc8ce4bd1d904145707f7361df1e1f23eeece', '9280f242d869d4e6394cd3ce8f9408e926032dce4c2b415d6d681d116d1c5d97', 'e1bdfdc90828982d9e0a8453bd34f250ad5c497af4f244e5cb384987ebe15e10', 'a21b956fb5ca768b3ffffa25c360a886ac5455276ca4665cf5abd52121a5b387', '4f9180bbbc3b8acec745747ff88565c7b637819a71743dc5f9a3cb5ab7346923', '6475c78f901e33ba7a951f06e2bf8f4eea311baf09c0620c6e1bf9719086286c', '487c92cba06244b35294be302f6188d12b8506343a74d9923f2fc7d95053ebcf', '377415eab7a3ccaa0ad128901adb181c807b36ad120619a52a7105609535fdb4', '5fbc69d81c94c0fee87bf0a93b0d8d6d0d9764dede4f2e5481d528d07fefb1f7', '040800fbf037446914696f6bd33be1dcb34dee61f793cf709f00d161e21fd81c', '7bb277bade338032c54ae1080011376c9fa0c7581c708a6f219f6f0414138aa6', '4539c312f37283d795affc0622d32f1ce8feac3c87e2651b5da974c0d0c069b1', '642317135fd4c4205323b9dea8af3270657e62d51dc31a657c0ec8aab31c6288', 'f03df3d4134230420cdf7acbb35f96a2542424246ab052ba24c6fec6a4d4f676', '3493b0c2376fe2a91dc804985ffd681f50210611597a2003f724c6744ce7120f', '6d30bbc96c99027f6bffe8151700f650f5c0be0cba2d2ac814dcccaf5cb99d46', '070df0ac4b1f46bb7450ec04508ef30853f378c6797201ea0ba21930a017704e']), /* Non-English - RSS Spam */ new PubkeyBanPolicy([ 'd8bb8acc4ba66f6f03b61e0cbab3a4ffe7753d9defc3b41087bd93ef919a6849' ]), new AntiDuplicationPolicy({ kv, minLength: 50 }), ]); return policy.call(event); } }