From 4a22804343b1037d0d8447ca4516f9f736fa55c1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 12 Jun 2020 14:19:12 +0100 Subject: [PATCH] Don't apply to blog posts --- semantic.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/semantic.py b/semantic.py index 1388dd2cc..2cb44e3b5 100644 --- a/semantic.py +++ b/semantic.py @@ -48,6 +48,10 @@ def labelAccusatoryPost(postJsonObject: {}, translate: {}, threshold=3): return if not postJsonObject['object'].get('content'): return + if not postJsonObject['object'].get('type'): + return + if postJsonObject['object']['type'] == 'Article': + return if postJsonObject['object'].get('inReplyTo'): return if not isinstance(postJsonObject['object']['content'], str):