mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-11-19 08:17:03 +01:00
move is_input_supported and post_process to async, fix some get_event_id async
This commit is contained in:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user