From 182c529047d04064c6a5b61ae2600a0f5fe37e32 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 29 Nov 2019 22:45:56 +0000 Subject: [PATCH] Check for published value --- inbox.py | 7 +++++++ webinterface.py | 20 +++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/inbox.py b/inbox.py index 2db7ed43b..571601463 100644 --- a/inbox.py +++ b/inbox.py @@ -1387,6 +1387,13 @@ def validPostContent(messageJson: {},maxMentions: int,maxEmoji: int) -> bool: return True if not messageJson['object'].get('content'): return True + + if not messageJson['object'].get('published'): + return False + if 'T' not in messageJson['object']['published']: + return False + if 'Z' not in messageJson['object']['published']: + return False # check for bad html invalidStrings=['