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 'text/html' in self.headers['Accept'] and self.path!='/login':
|
||||||
if '/media/' not in self.path and \
|
if '/media/' not in self.path and \
|
||||||
'/sharefiles/' not in self.path and \
|
'/sharefiles/' not in self.path and \
|
||||||
'/icons/' not in self.path and \
|
'/icons/' not in self.path:
|
||||||
self.path != '/inbox':
|
|
||||||
divertToLoginScreen=True
|
divertToLoginScreen=True
|
||||||
if self.path.startswith('/users/'):
|
if self.path.startswith('/users/'):
|
||||||
nickStr=self.path.split('/users/')[1]
|
nickStr=self.path.split('/users/')[1]
|
||||||
|
|
|
@ -267,6 +267,9 @@ def personLookup(domain: str,path: str,baseDir: str) -> {}:
|
||||||
"""
|
"""
|
||||||
if path.endswith('#main-key'):
|
if path.endswith('#main-key'):
|
||||||
path=path.replace('#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', \
|
notPersonLookup=['/inbox','/outbox','/outboxarchive', \
|
||||||
'/followers','/following','/featured', \
|
'/followers','/following','/featured', \
|
||||||
'.png','.jpg','.gif','.mpv']
|
'.png','.jpg','.gif','.mpv']
|
||||||
|
@ -284,8 +287,8 @@ def personLookup(domain: str,path: str,baseDir: str) -> {}:
|
||||||
return None
|
return None
|
||||||
if ':' in domain:
|
if ':' in domain:
|
||||||
domain=domain.split(':')[0]
|
domain=domain.split(':')[0]
|
||||||
handle=nickname.lower()+'@'+domain.lower()
|
handle=nickname+'@'+domain
|
||||||
filename=baseDir+'/accounts/'+handle.lower()+'.json'
|
filename=baseDir+'/accounts/'+handle+'.json'
|
||||||
if not os.path.isfile(filename):
|
if not os.path.isfile(filename):
|
||||||
return None
|
return None
|
||||||
personJson={"user": "unknown"}
|
personJson={"user": "unknown"}
|
||||||
|
|
Loading…
Reference in New Issue