mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-03-26 17:41:43 +01:00
fixes
This commit is contained in:
parent
fd7f051c47
commit
b68c4a4b42
@ -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()])
|
||||
|
@ -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()
|
||||
|
@ -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":
|
||||
|
Loading…
x
Reference in New Issue
Block a user