From 5ce7a2af0d12a09dcc08b598fca52f67c2aea979 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 18 Sep 2024 23:12:31 -0600 Subject: [PATCH] fix --- block.sh | 2 +- src/policies/emoji.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/block.sh b/block.sh index cdac39f..38baeec 100755 --- a/block.sh +++ b/block.sh @@ -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 diff --git a/src/policies/emoji.ts b/src/policies/emoji.ts index 86605cd..72b03b8 100644 --- a/src/policies/emoji.ts +++ b/src/policies/emoji.ts @@ -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,