From e0a2e3ad9855d81692e100e6454624bea21963c0 Mon Sep 17 00:00:00 2001 From: Believethehype <1097224+believethehype@users.noreply.github.com> Date: Fri, 29 Nov 2024 09:24:39 +0100 Subject: [PATCH] Update nostr_utils.py --- nostr_dvm/utils/nostr_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nostr_dvm/utils/nostr_utils.py b/nostr_dvm/utils/nostr_utils.py index 72f52d8..769bea2 100644 --- a/nostr_dvm/utils/nostr_utils.py +++ b/nostr_dvm/utils/nostr_utils.py @@ -419,7 +419,8 @@ async def update_profile(dvm_config, client, lud16=""): async def send_nip04_dm(client: Client, msg, receiver: PublicKey, dvm_config): keys = Keys.parse(dvm_config.PRIVATE_KEY) - content = await keys.nip04_encrypt(receiver, msg) + signer = NostrSigner.keys(keys) + content = await signer.nip04_encrypt(receiver, msg) ptag = Tag.parse(["p", receiver.to_hex()]) event = EventBuilder(Kind(4), content).tags([ptag]).sign_with_keys(Keys.parse(dvm_config.PRIVATE_KEY)) await client.send_event(event)