Replies on federation list

master
Bob Mottram 2019-06-28 22:01:02 +01:00
parent f7fbfd9c5b
commit 7924f4184b
1 changed files with 14 additions and 2 deletions

View File

@ -92,8 +92,20 @@ class PubServer(BaseHTTPRequestHandler):
if domain in actor: if domain in actor:
permittedDomain=True permittedDomain=True
break break
return permittedDomain if not permittedDomain:
return False
if message.get('object'):
if message['object'].get('inReplyTo'):
inReplyTo=message['object']['inReplyTo']
permittedReplyDomain=False
for domain in federationList:
if domain in inReplyTo:
permittedReplyDomain=True
break
if not permittedReplyDomain:
return False
return True
def do_GET(self): def do_GET(self):
if not self.permittedDir(self.path): if not self.permittedDir(self.path):
self._404() self._404()