Skip to content

Commit

Permalink
Update nostr_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
believethehype committed Nov 29, 2024
1 parent 4baa62b commit e0a2e3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nostr_dvm/utils/nostr_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e0a2e3a

Please sign in to comment.