move is_input_supported and post_process to async, fix some get_event_id async

This commit is contained in:
Believethehype
2024-06-17 09:12:48 +02:00
parent 1b65ccedd2
commit b5a848d7fc
45 changed files with 150 additions and 154 deletions

View File

@@ -29,7 +29,7 @@ class AdvancedSearch(DVMTaskInterface):
admin_config: AdminConfig = None, options=None):
dvm_config.SCRIPT = os.path.abspath(__file__)
def is_input_supported(self, tags, client=None, dvm_config=None):
async def is_input_supported(self, tags, client=None, dvm_config=None):
for tag in tags:
if tag.as_vec()[0] == 'i':
input_value = tag.as_vec()[1]
@@ -38,7 +38,7 @@ class AdvancedSearch(DVMTaskInterface):
return False
return True
def create_request_from_nostr_event(self, event, client=None, dvm_config=None):
async def create_request_from_nostr_event(self, event, client=None, dvm_config=None):
self.dvm_config = dvm_config
print(self.dvm_config.PRIVATE_KEY)
@@ -144,7 +144,7 @@ class AdvancedSearch(DVMTaskInterface):
await cli.shutdown()
return json.dumps(result_list)
def post_process(self, result, event):
async def post_process(self, result, event):
"""Overwrite the interface function to return a social client readable format, if requested"""
for tag in event.tags():
if tag.as_vec()[0] == 'output':