From 0bc77af81de63c98cb4aa4aad59e3d5f541dee7c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 25 Aug 2020 21:20:56 +0100 Subject: [PATCH] Check that post was saved to outbox --- outbox.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/outbox.py b/outbox.py index 8fcf5865b..c64405159 100644 --- a/outbox.py +++ b/outbox.py @@ -188,6 +188,9 @@ def postMessageToOutbox(messageJson: {}, postToNickname: str, postId, postToNickname, domainFull, messageJson, outboxName) + if not savedFilename: + print('WARN: post not saved to outbox ' + outboxName) + return False if messageJson['type'] == 'Create' or \ messageJson['type'] == 'Question' or \ messageJson['type'] == 'Note' or \ @@ -200,6 +203,8 @@ def postMessageToOutbox(messageJson: {}, postToNickname: str, selfActor = \ httpPrefix + '://' + domainFull + '/users/' + postToNickname for boxNameIndex in indexes: + if not boxNameIndex: + continue if boxNameIndex == 'inbox' and outboxName == 'tlblogs': continue # avoid duplicates of the message if already going