diff --git a/nostr_dvm/tasks/discovery_inactive_follows.py b/nostr_dvm/tasks/discovery_inactive_follows.py index 6849d27..a3ef6cd 100644 --- a/nostr_dvm/tasks/discovery_inactive_follows.py +++ b/nostr_dvm/tasks/discovery_inactive_follows.py @@ -80,7 +80,7 @@ class DiscoverInactiveFollows(DVMTaskInterface): options = DVMTaskInterface.set_options(request_form) step = 20 - followers_filter = Filter().author(PublicKey.from_hex(options["user"])).kind(3).limit(1) + followers_filter = Filter().author(PublicKey.from_hex(options["user"])).kind(Kind(3)).limit(1) followers = cli.get_events_of([followers_filter], timedelta(seconds=self.dvm_config.RELAY_TIMEOUT)) if len(followers) > 0: diff --git a/nostr_dvm/tasks/discovery_nonfollowers.py b/nostr_dvm/tasks/discovery_nonfollowers.py index 4239401..cf38b42 100644 --- a/nostr_dvm/tasks/discovery_nonfollowers.py +++ b/nostr_dvm/tasks/discovery_nonfollowers.py @@ -76,7 +76,7 @@ class DiscoverNonFollowers(DVMTaskInterface): options = DVMTaskInterface.set_options(request_form) step = 20 - followers_filter = Filter().author(PublicKey.from_hex(options["user"])).kind(3) + followers_filter = Filter().author(PublicKey.from_hex(options["user"])).kind(Kind(3)) followers = cli.get_events_of([followers_filter], timedelta(seconds=self.dvm_config.RELAY_TIMEOUT)) if len(followers) > 0: @@ -112,7 +112,7 @@ class DiscoverNonFollowers(DVMTaskInterface): for i in range(i, i + st): filters = [] - filter1 = Filter().author(PublicKey.from_hex(users[i])).kind(3) + filter1 = Filter().author(PublicKey.from_hex(users[i])).kind(Kind(3)) filters.append(filter1) followers = cli.get_events_of(filters, timedelta(seconds=3)) diff --git a/nostr_dvm/utils/zap_utils.py b/nostr_dvm/utils/zap_utils.py index de24b26..5ced977 100644 --- a/nostr_dvm/utils/zap_utils.py +++ b/nostr_dvm/utils/zap_utils.py @@ -50,7 +50,7 @@ def parse_zap_event_tags(zap_event, keys, name, client, config): keys.secret_key(), zap_request_event.author()) decrypted_private_event = Event.from_json(decrypted_content) - if decrypted_private_event.kind() == 9733: + if decrypted_private_event.kind().as_u64() == 9733: sender = decrypted_private_event.author().to_hex() message = decrypted_private_event.content() # if message != "":