From 2881e06287c64df7e97cea6be413e9292c9a02e0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 25 Aug 2020 18:28:29 +0100 Subject: [PATCH] Update events index --- outbox.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/outbox.py b/outbox.py index f4a3b237..0c4b7faf 100644 --- a/outbox.py +++ b/outbox.py @@ -179,6 +179,8 @@ def postMessageToOutbox(messageJson: {}, postToNickname: str, if messageJson['object'].get('type'): if messageJson['object']['type'] == 'Article': outboxName = 'tlblogs' + elif messageJson['object']['type'] == 'Event': + outboxName = 'tlevent' savedFilename = \ savePostToBox(baseDir, @@ -195,12 +197,12 @@ def postMessageToOutbox(messageJson: {}, postToNickname: str, messageJson['type'] == 'Patch' or \ messageJson['type'] == 'Announce': indexes = [outboxName, "inbox"] + selfActor = \ + httpPrefix + '://' + domainFull + \ + '/users/' + postToNickname for boxNameIndex in indexes: if boxNameIndex == 'inbox' and outboxName == 'tlblogs': continue - selfActor = \ - httpPrefix + '://' + domainFull + \ - '/users/' + postToNickname # avoid duplicates of the message if already going # back to the inbox of the same account if selfActor not in messageJson['to']: