mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-11-18 19:46:36 +01:00
added advanced search for notes
This commit is contained in:
@@ -23,6 +23,9 @@ class EventDefinitions:
|
||||
KIND_NIP90_CONTENT_DISCOVERY = 5300
|
||||
KIND_NIP90_RESULT_CONTENT_DISCOVERY = 6300
|
||||
KIND_NIP90_PEOPLE_DISCOVERY = 5301
|
||||
KIND_NIP90_RESULT_PEOPLE_DISCOVERY = 6301
|
||||
KIND_NIP90_CONTENT_SEARCH = 5302
|
||||
KIND_NIP90_RESULTS_CONTENT_SEARCH = 6302
|
||||
KIND_NIP90_GENERIC = 5999
|
||||
KIND_NIP90_RESULT_GENERIC = 6999
|
||||
ANY_RESULT = [KIND_NIP90_RESULT_EXTRACT_TEXT,
|
||||
@@ -34,6 +37,7 @@ class EventDefinitions:
|
||||
KIND_NIP90_PEOPLE_DISCOVERY,
|
||||
KIND_NIP90_RESULT_CONVERT_VIDEO,
|
||||
KIND_NIP90_RESULT_CONTENT_DISCOVERY,
|
||||
KIND_NIP90_RESULT_PEOPLE_DISCOVERY,
|
||||
KIND_NIP90_RESULT_GENERIC]
|
||||
|
||||
|
||||
|
||||
@@ -98,9 +98,9 @@ def post_process_list_to_events(result):
|
||||
result_list = json.loads(result)
|
||||
result_str = ""
|
||||
for tag in result_list:
|
||||
p_tag = Tag.parse(tag)
|
||||
e_tag = Tag.parse(tag)
|
||||
result_str = result_str + "nostr:" + EventId.from_hex(
|
||||
p_tag.as_vec()[1]).to_bech32() + "\n"
|
||||
e_tag.as_vec()[1]).to_bech32() + "\n"
|
||||
return result_str
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user