From 9d00d5a7a1edbcf56056297197137622ef81dc7d Mon Sep 17 00:00:00 2001 From: Believethehype <1097224+believethehype@users.noreply.github.com> Date: Fri, 14 Jun 2024 20:02:23 +0200 Subject: [PATCH] fixes --- nostr_dvm/bot.py | 2 +- nostr_dvm/utils/nostr_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nostr_dvm/bot.py b/nostr_dvm/bot.py index 502dbd0..ca9b5e9 100644 --- a/nostr_dvm/bot.py +++ b/nostr_dvm/bot.py @@ -95,7 +95,7 @@ class Bot: await handle_dm(nostr_event, False) except Exception as e: print(f"Error during content NIP04 decryption: {e}") - elif nostr_event.kind() == Kind.from_enum(KindEnum.GIFT_WRAP(): + elif nostr_event.kind() == Kind.from_enum(KindEnum.GIFT_WRAP()): try: await handle_dm(nostr_event, True) except Exception as e: diff --git a/nostr_dvm/utils/nostr_utils.py b/nostr_dvm/utils/nostr_utils.py index b3af6f7..4273669 100644 --- a/nostr_dvm/utils/nostr_utils.py +++ b/nostr_dvm/utils/nostr_utils.py @@ -33,7 +33,7 @@ async def get_event_by_id(event_id: str, client: Client, config=None) -> Event | id_filter = Filter().id(event_id).limit(1) #events = client.get_events_of([id_filter], timedelta(seconds=config.RELAY_TIMEOUT)) - events = asyncio.run(get_events_async(client, id_filter, config.RELAY_TIMEOUT)) + events = await get_events_async(client, id_filter, config.RELAY_TIMEOUT) if len(events) > 0: