mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-04-08 20:08:08 +02:00
Update subscription.py
This commit is contained in:
parent
d325f3b66f
commit
6d379854d5
@ -59,7 +59,7 @@ class Subscription:
|
||||
if admin_config is not None:
|
||||
for key in admin_config.USERNPUBS:
|
||||
authors.append(PublicKey.parse(key))
|
||||
dvm_filter = Filter().authors(authors).pubkey(pk).kinds([EventDefinitions.KIND_NIP90_DVM_SUBSCRIPTION.as_u64()]).since(Timestamp.now())
|
||||
dvm_filter = Filter().authors(authors).pubkey(pk).kinds([EventDefinitions.KIND_NIP90_DVM_SUBSCRIPTION]).since(Timestamp.now())
|
||||
|
||||
self.client.subscribe([zap_filter, dvm_filter, cancel_subscription_filter], None)
|
||||
|
||||
@ -71,7 +71,7 @@ class Subscription:
|
||||
keys = self.keys
|
||||
|
||||
def handle(self, relay_url, subscription_id, nostr_event: Event):
|
||||
if nostr_event.kind().as_u64() == EventDefinitions.KIND_NIP90_DVM_SUBSCRIPTION.as_u64():
|
||||
if nostr_event.kind().as_u64() == EventDefinitions.KIND_NIP90_DVM_SUBSCRIPTION.as_u64():
|
||||
handle_nwc_request(nostr_event)
|
||||
elif nostr_event.kind().as_u64() == EventDefinitions.KIND_NIP88_STOP_SUBSCRIPTION_EVENT.as_u64():
|
||||
handle_cancel(nostr_event)
|
||||
|
Loading…
x
Reference in New Issue
Block a user