Stabilize (#24)
* refactor: clean-up * refactor: extra logs plus try-catch * refactor: do not use bare `except` * refactor: clean-up redundant fields * chore: pass code checks * chore: code format * refactor: code clean-up * fix: refactoring stuff * refactor: remove un-used file * chore: code clean-up * chore: code clean-up * chore: code-format fix * refactor: remove nostr.client wrapper * refactor: code clean-up * chore: code format * refactor: remove `RelayList` class * refactor: extract smaller methods with try-catch * fix: better exception handling * fix: remove redundant filters * fix: simplify event * chore: code format * fix: code check * fix: code check * fix: simplify `REQ` * fix: more clean-ups * refactor: use simpler method * refactor: re-order and rename * fix: stop logic * fix: subscription close before disconnect * chore: play commit
This commit is contained in:
parent
ab185bd2c4
commit
16ae9d15a1
20 changed files with 522 additions and 717 deletions
|
|
@ -1,13 +1,7 @@
|
|||
from .filter import Filters
|
||||
from typing import List
|
||||
|
||||
|
||||
class Subscription:
|
||||
def __init__(self, id: str, filters: Filters=None) -> None:
|
||||
def __init__(self, id: str, filters: List[str] = None) -> None:
|
||||
self.id = id
|
||||
self.filters = filters
|
||||
|
||||
def to_json_object(self):
|
||||
return {
|
||||
"id": self.id,
|
||||
"filters": self.filters.to_json_array()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue