From 4c4f22408306a86a84d43140cf646f729417fd92 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Tue, 6 Feb 2024 16:46:09 -0800 Subject: [PATCH] Fix nip46 key --- dufflepud/app.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dufflepud/app.py b/dufflepud/app.py index fbd9550..4489c70 100644 --- a/dufflepud/app.py +++ b/dufflepud/app.py @@ -154,11 +154,12 @@ def _get_handle_info(handle): name, domain = m.groups() res = req_json('get', f'https://{domain}/.well-known/nostr.json?name={name}') or {} + pubkey = res.get('names', {}).get(name) return { - 'relays': res.get('relays', {}).get(name), - 'pubkey': res.get('names', {}).get(name), - 'nip46': res.get('nip46', {}).get(name), + 'pubkey': pubkey, + 'relays': res.get('relays', {}).get(pubkey), + 'nip46': res.get('nip46', {}).get(pubkey), }