refactor: rename variables
This commit is contained in:
parent
9501286c1f
commit
24f803921e
1 changed files with 4 additions and 6 deletions
|
|
@ -21,17 +21,15 @@ class NostrClientManager:
|
||||||
self._active_relays: dict = {}
|
self._active_relays: dict = {}
|
||||||
self._is_ready = False
|
self._is_ready = False
|
||||||
|
|
||||||
async def add_client(self, client: "NostrClientConnection") -> bool:
|
async def add_client(self, c: "NostrClientConnection") -> bool:
|
||||||
if not self._is_ready:
|
if not self._is_ready:
|
||||||
await self.init_relays()
|
await self.init_relays()
|
||||||
|
|
||||||
allow_connect = await self._allow_client(client)
|
if not (await self._allow_client(c)):
|
||||||
if not allow_connect:
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
self._set_client_callbacks(client)
|
self._set_client_callbacks(c)
|
||||||
|
self.clients(c.relay_id).append(c)
|
||||||
self.clients(client.relay_id).append(client)
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue