From 3a993e5d4948a3fa73aad1fe4f9fd86a097b02fa Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 26 Aug 2019 16:20:14 +0100 Subject: [PATCH] Instance actor url --- epicyon.py | 1 + person.py | 4 +++- webfinger.py | 6 ++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/epicyon.py b/epicyon.py index 5018d261..e88ae9ff 100644 --- a/epicyon.py +++ b/epicyon.py @@ -833,6 +833,7 @@ if args.actor: session=createSession(domain,port,useTor) if nickname=='inbox': nickname=domain + wfRequest=webfingerHandle(session,nickname+'@'+domain,httpPrefix,wfCache, \ None,__version__) if not wfRequest: diff --git a/person.py b/person.py index 9003a5a8..d28522fe 100644 --- a/person.py +++ b/person.py @@ -149,10 +149,12 @@ def createPersonBase(baseDir: str,nickname: str,domain: str,port: int, \ personName=nickname personId=httpPrefix+'://'+domain+'/users/'+nickname inboxStr=personId+'/inbox' + personUrl=httpPrefix+'://'+domain+'/@'+personName if nickname=='inbox': # shared inbox inboxStr=httpPrefix+'://'+domain+'/actor/inbox' personId=httpPrefix+'://'+domain+'/actor' + personUrl=httpPrefix+'://'+domain+'/about/more?instance_actor=true' personName=originalDomain approveFollowers=True personType='Application' @@ -202,7 +204,7 @@ def createPersonBase(baseDir: str,nickname: str,domain: str,port: int, \ }, 'tag': [], 'type': personType, - 'url': httpPrefix+'://'+domain+'/@'+personName + 'url': personUrl } if nickname=='inbox': diff --git a/webfinger.py b/webfinger.py index e7f2303b..9f5309fb 100644 --- a/webfinger.py +++ b/webfinger.py @@ -111,11 +111,13 @@ def createWebfingerEndpoint(nickname: str,domain: str,port: int, \ personName=nickname personId=httpPrefix+"://"+domain+"/users/"+personName subjectStr="acct:"+personName+"@"+originalDomain + profilePageHref=httpPrefix+"://"+domain+"/@"+nickname if nickname=='inbox' or nickname==originalDomain: personName='actor' personId=httpPrefix+"://"+domain+"/"+personName subjectStr="acct:"+originalDomain+"@"+originalDomain - + profilePageHref=httpPrefix+'://'+domain+'/about/more?instance_actor=true' + account = { "aliases": [ httpPrefix+"://"+domain+"/@"+personName, @@ -123,7 +125,7 @@ def createWebfingerEndpoint(nickname: str,domain: str,port: int, \ ], "links": [ { - "href": httpPrefix+"://"+domain+"/@"+nickname, + "href": profilePageHref, "rel": "http://webfinger.net/rel/profile-page", "type": "text/html" },