specific spam prevention

This commit is contained in:
Vishal 2022-12-29 16:26:43 +05:30
parent 576e544930
commit 255f664021
2 changed files with 7 additions and 0 deletions

View File

@ -1399,6 +1399,11 @@ class Store {
// add the event to the main event store thats allChildEventsMap
newEventsToProcess.forEach((newEvent) {
if( newEvent.eventData.kind == 1 && newEvent.eventData.content.compareTo("Hello Nostr! :)") == 0 && newEvent.eventData.id.substring(0,2).compareTo("00") == 0) {
return; // spam prevention
}
if( allChildEventsMap.containsKey(newEvent.eventData.id)) {// don't process if the event is already present in the map
return;
}

View File

@ -2,6 +2,8 @@
source ./configfile.cfg
# ./send_request.sh '["REQ","name",{"ids":["b10180"]}]'
for server in ${nostr_servers[@]};
do
>&2 echo -e "\n\n------------Sending $1 to $server---------------------------\n"