diff --git a/examples/ollama_dvm/test_client.py b/examples/ollama_dvm/test_client.py index ab9a8c5..e0a4177 100644 --- a/examples/ollama_dvm/test_client.py +++ b/examples/ollama_dvm/test_client.py @@ -61,7 +61,7 @@ async def nostr_client(): #nostr_client_test_image_private("a beautiful ostrich watching the sunset") class NotificationHandler(HandleNotification): - def handle(self, relay_url, subscription_id, event: Event): + async def handle(self, relay_url, subscription_id, event: Event): print(f"Received new event from {relay_url}: {event.as_json()}") if event.kind() == 7000: print("[Nostr Client]: " + event.as_json()) diff --git a/examples/unleashed_dvm/test_client.py b/examples/unleashed_dvm/test_client.py index 41db3a8..7ce4e54 100644 --- a/examples/unleashed_dvm/test_client.py +++ b/examples/unleashed_dvm/test_client.py @@ -66,7 +66,7 @@ async def nostr_client(): class NotificationHandler(HandleNotification): - def handle(self, relay_url, subscription_id, event: Event): + async def handle(self, relay_url, subscription_id, event: Event): print(f"Received new event from {relay_url}: {event.as_json()}") if event.kind() == 7000: print("[Nostr Client]: " + event.as_json()) @@ -83,7 +83,7 @@ async def nostr_client(): print("[Nostr Client]: " + f"Received new zap:") print(event.as_json()) - def handle_msg(self, relay_url, msg): + async def handle_msg(self, relay_url, msg): return asyncio.create_task(client.handle_notifications(NotificationHandler()))