From 8ed361230b32e10eda5ab22cae521e2ca4aba30a Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Thu, 6 Apr 2023 17:33:09 +0300 Subject: [PATCH] refactor: prepare for pay check --- relay/client_connection.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/relay/client_connection.py b/relay/client_connection.py index f58cc89..23a8738 100644 --- a/relay/client_connection.py +++ b/relay/client_connection.py @@ -186,8 +186,9 @@ class NostrClientConnection: await mark_events_deleted(self.relay_id, NostrFilter(ids=ids)) async def _handle_request(self, subscription_id: str, filter: NostrFilter) -> List: - if not self.auth_pubkey and self.config.require_auth_filter: - return [["AUTH", self._current_auth_challenge()]] + if self.config.require_auth_filter: + if not self.auth_pubkey: + return [["AUTH", self._current_auth_challenge()]] filter.subscription_id = subscription_id self._remove_filter(subscription_id)