feat: respond with challenge to client AUTH message
This commit is contained in:
parent
9aa0fdbd2c
commit
88d53bd73d
1 changed files with 3 additions and 3 deletions
|
|
@ -158,7 +158,7 @@ class NostrClientConnection:
|
||||||
if message_type == NostrEventType.CLOSE:
|
if message_type == NostrEventType.CLOSE:
|
||||||
self._handle_close(data[1])
|
self._handle_close(data[1])
|
||||||
if message_type == NostrEventType.AUTH:
|
if message_type == NostrEventType.AUTH:
|
||||||
self._handle_auth(data[1])
|
await self._handle_auth(data[1])
|
||||||
|
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
@ -257,8 +257,8 @@ class NostrClientConnection:
|
||||||
def _handle_close(self, subscription_id: str):
|
def _handle_close(self, subscription_id: str):
|
||||||
self._remove_filter(subscription_id)
|
self._remove_filter(subscription_id)
|
||||||
|
|
||||||
def _handle_auth(self):
|
async def _handle_auth(self):
|
||||||
raise ValueError("Not supported")
|
await self._send_msg(["AUTH", self._current_auth_challenge()])
|
||||||
|
|
||||||
def _can_add_filter(self) -> bool:
|
def _can_add_filter(self) -> bool:
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue