mirror of https://gitlab.com/bashrc2/epicyon
Lookup of shared inbox
parent
646c3ecc1e
commit
ba3460418c
|
@ -438,8 +438,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if 'text/html' in self.headers['Accept'] and self.path!='/login':
|
||||
if '/media/' not in self.path and \
|
||||
'/sharefiles/' not in self.path and \
|
||||
'/icons/' not in self.path and \
|
||||
self.path != '/inbox':
|
||||
'/icons/' not in self.path:
|
||||
divertToLoginScreen=True
|
||||
if self.path.startswith('/users/'):
|
||||
nickStr=self.path.split('/users/')[1]
|
||||
|
|
|
@ -267,6 +267,9 @@ def personLookup(domain: str,path: str,baseDir: str) -> {}:
|
|||
"""
|
||||
if path.endswith('#main-key'):
|
||||
path=path.replace('#main-key','')
|
||||
if path=='/inbox' or path=='/users/inbox' or path=='/sharedInbox':
|
||||
path='/users/inbox'
|
||||
else:
|
||||
notPersonLookup=['/inbox','/outbox','/outboxarchive', \
|
||||
'/followers','/following','/featured', \
|
||||
'.png','.jpg','.gif','.mpv']
|
||||
|
@ -284,8 +287,8 @@ def personLookup(domain: str,path: str,baseDir: str) -> {}:
|
|||
return None
|
||||
if ':' in domain:
|
||||
domain=domain.split(':')[0]
|
||||
handle=nickname.lower()+'@'+domain.lower()
|
||||
filename=baseDir+'/accounts/'+handle.lower()+'.json'
|
||||
handle=nickname+'@'+domain
|
||||
filename=baseDir+'/accounts/'+handle+'.json'
|
||||
if not os.path.isfile(filename):
|
||||
return None
|
||||
personJson={"user": "unknown"}
|
||||
|
|
Loading…
Reference in New Issue