From 88d53bd73d11e971c51d0238cf397ccbf7b3b355 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Wed, 15 Feb 2023 11:44:35 +0200 Subject: [PATCH] feat: respond with challenge to client `AUTH` message --- client_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client_manager.py b/client_manager.py index 3a2cd12..6750193 100644 --- a/client_manager.py +++ b/client_manager.py @@ -158,7 +158,7 @@ class NostrClientConnection: if message_type == NostrEventType.CLOSE: self._handle_close(data[1]) if message_type == NostrEventType.AUTH: - self._handle_auth(data[1]) + await self._handle_auth(data[1]) return [] @@ -257,8 +257,8 @@ class NostrClientConnection: def _handle_close(self, subscription_id: str): self._remove_filter(subscription_id) - def _handle_auth(self): - raise ValueError("Not supported") + async def _handle_auth(self): + await self._send_msg(["AUTH", self._current_auth_challenge()]) def _can_add_filter(self) -> bool: return (