diff --git a/daemon.py b/daemon.py index d091dbe47..0752e9be5 100644 --- a/daemon.py +++ b/daemon.py @@ -4073,7 +4073,7 @@ class PubServer(BaseHTTPRequestHandler): # remove any trailing slashes from the path if not self.path.endswith('confirm'): self.path= \ - self.path.replace('/outbox/','/outbox').replace('/inbox/','/inbox').replace('/shares/','/shares').replace('/sharedInbox/','/sharedInbox') + self.path.replace('/outbox/','/outbox').replace('/tlblogs/','/tlblogs').replace('/inbox/','/inbox').replace('/shares/','/shares').replace('/sharedInbox/','/sharedInbox') if self.path=='/inbox': if not self.server.enableSharedInbox: @@ -4093,7 +4093,7 @@ class PubServer(BaseHTTPRequestHandler): print('POST Not authorized') print(str(self.headers)) - # if this is a POST to teh outbox then check authentication + # if this is a POST to the outbox then check authentication self.outboxAuthenticated=False self.postToNickname=None diff --git a/outbox.py b/outbox.py index b6a529108..574202ee9 100644 --- a/outbox.py +++ b/outbox.py @@ -158,8 +158,14 @@ def postMessageToOutbox(messageJson: {},postToNickname: str, \ print('DEBUG: savePostToBox') if messageJson['type']!='Upgrade': outboxName='outbox' - if messageJson['type']=='Article': - outboxName='tlblogs' + + # if this is a blog post then save to its own box + if messageJson['type']=='Create': + if messageJson.get('object'): + if isinstance(messageJson['object'], dict): + if messageJson['object'].get('type'): + if messageJson['object']['type']=='Article': + outboxName='tlblogs' savedFilename= \ savePostToBox(baseDir, \