From b44d364449dc2e2ad5ce78058ec77c7ddce79773 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 2 Mar 2020 13:35:24 +0000 Subject: [PATCH] Check that onion domain has been given --- inbox.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inbox.py b/inbox.py index 85d4c9602..1eb82ed68 100644 --- a/inbox.py +++ b/inbox.py @@ -190,8 +190,9 @@ def getPersonPubKey(baseDir: str,session,personUrl: str, \ if debug: print('DEBUG: Obtaining public key for '+personUrl) personDomain=domain - if '.onion/' in personUrl: - personDomain=onionDomain + if onionDomain: + if '.onion/' in personUrl: + personDomain=onionDomain asHeader = { 'Accept': 'application/activity+json; profile="https://www.w3.org/ns/activitystreams"' }