This commit is contained in:
Your Name 2024-09-18 23:12:31 -06:00
parent 72e5acdd4d
commit 5ce7a2af0d
2 changed files with 11 additions and 1 deletions
block.sh
src/policies

View File

@ -1,4 +1,4 @@
#!/bin/bash
HEX=$(nak decode $1 | jq ".pubkey" | sed 's/"//i' | sed 's/"//i')
echo "Adding $1 to block list"
sed -i "30a '$HEX'," /opt/strfry-policies/strfry-policy.ts
sed -i "50a '$HEX'," /opt/strfry-policies/strfry-policy.ts

View File

@ -15,7 +15,17 @@ var rainbow_count = (content.match(/🌈/g) || []).length;
var happy_count = (content.match(/😀/g) || []).length;
var hundred_count = (content.match(/💯/g) || []).length;
var party_count = (content.match(/🎉/g) || []).length;
var thinking_count = (content.match(/🤔/g) || []).length;
var limit = 1;
if ( thinking_count > 0 && hundred_count > 0 ) {
return {
id,
action: 'reject',
msg: 'ReplyGuy Dual Emoji Policy: Blocked!',
};
}
if ( happy_count > 0 && happy_count > 0 && fire_count > 0 ) {
return {
id,