diff --git a/nostr_dvm/dvm.py b/nostr_dvm/dvm.py index dcd2a05..2563e79 100644 --- a/nostr_dvm/dvm.py +++ b/nostr_dvm/dvm.py @@ -387,7 +387,7 @@ class DVM: dvm_config=None): task = get_task(original_event, client=client, dvm_config=dvm_config) - alt_description, reaction = build_status_reaction(status, task, amount, content) + alt_description, reaction = build_status_reaction(status, task, amount, content, dvm_config) e_tag = Tag.parse(["e", original_event.id().to_hex()]) p_tag = Tag.parse(["p", original_event.author().to_hex()]) diff --git a/nostr_dvm/tasks/discovery_nonfollowers.py b/nostr_dvm/tasks/discovery_nonfollowers.py index 5e9bb0c..5b062a0 100644 --- a/nostr_dvm/tasks/discovery_nonfollowers.py +++ b/nostr_dvm/tasks/discovery_nonfollowers.py @@ -92,7 +92,7 @@ class DiscoverNonFollowers(DVMTaskInterface): if tag.as_vec()[0] == "p": following = tag.as_vec()[1] followings.append(following) - ns.dic[following] = "False" + ns.dic[following] = "True" print("Followings: " + str(len(followings))) @@ -124,14 +124,17 @@ class DiscoverNonFollowers(DVMTaskInterface): newest = entry.created_at().as_secs() best_entry = entry - #print(best_entry.as_json()) + foundfollower = False for tag in best_entry.tags(): if tag.as_vec()[0] == "p": if len(tag.as_vec()) > 1: if tag.as_vec()[1] == options["user"]: - print("FOUND FOLLOWING") - instance.dic[best_entry.author().to_hex()] = "True" - break + foundfollower = True + break + + if not foundfollower: + instance.dic[best_entry.author().to_hex()] = "False" + print( "DIDNT FIND " + best_entry.author().to_nostr_uri()) print(str(i) + "/" + str(len(users))) cli.disconnect() diff --git a/nostr_dvm/utils/output_utils.py b/nostr_dvm/utils/output_utils.py index c5e5347..ca50ab7 100644 --- a/nostr_dvm/utils/output_utils.py +++ b/nostr_dvm/utils/output_utils.py @@ -182,7 +182,7 @@ def upload_media_to_hoster(filepath: str): raise Exception("Upload not possible, all hosters didn't work or couldn't generate output") -def build_status_reaction(status, task, amount, content): +def build_status_reaction(status, task, amount, content, dvm_config): alt_description = "This is a reaction to a NIP90 DVM AI task. " if status == "processing":