mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-07-07 20:09:56 +02:00
Update subscription.py
This commit is contained in:
@ -59,7 +59,7 @@ class Subscription:
|
|||||||
if admin_config is not None:
|
if admin_config is not None:
|
||||||
for key in admin_config.USERNPUBS:
|
for key in admin_config.USERNPUBS:
|
||||||
authors.append(PublicKey.parse(key))
|
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)
|
self.client.subscribe([zap_filter, dvm_filter, cancel_subscription_filter], None)
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ class Subscription:
|
|||||||
keys = self.keys
|
keys = self.keys
|
||||||
|
|
||||||
def handle(self, relay_url, subscription_id, nostr_event: Event):
|
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)
|
handle_nwc_request(nostr_event)
|
||||||
elif nostr_event.kind().as_u64() == EventDefinitions.KIND_NIP88_STOP_SUBSCRIPTION_EVENT.as_u64():
|
elif nostr_event.kind().as_u64() == EventDefinitions.KIND_NIP88_STOP_SUBSCRIPTION_EVENT.as_u64():
|
||||||
handle_cancel(nostr_event)
|
handle_cancel(nostr_event)
|
||||||
|
Reference in New Issue
Block a user