From 6b5b9410d156ed032053d0017d5c36f6d00d7c6c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 23 Aug 2019 15:18:31 +0100 Subject: [PATCH] Get shared inbox handle from webfinger --- webfinger.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webfinger.py b/webfinger.py index 1c340ea5..ac26b35b 100644 --- a/webfinger.py +++ b/webfinger.py @@ -176,6 +176,11 @@ def webfingerLookup(path: str,baseDir: str,port: int,debug: bool) -> {}: if port!=80 and port !=443: if ':' not in handle: handle=handle+':'+str(port) + # convert @domain@domain to inbox@domain + if '@' in handle: + handleDomain=handle.split('@')[1] + if handle.startswith(domain+'@'): + handle='inbox@'+handleDomain filename=baseDir+'/wfendpoints/'+handle.lower()+'.json' if debug: print('DEBUG: WEBFINGER filename '+filename)