From 233f8440c686055ac893bf51d066a0e148916594 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 10 Oct 2020 22:03:12 +0100 Subject: [PATCH] Check for news editor --- webinterface.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/webinterface.py b/webinterface.py index 1a83cb91b..087f2f8b2 100644 --- a/webinterface.py +++ b/webinterface.py @@ -4592,17 +4592,13 @@ def individualPostAsHtml(allowDownloads: bool, print('TIMING INDIV ' + boxName + ' 11 = ' + str(timeDiff)) editStr = '' - print('EDIT TEST 1') - if postJsonObject['actor'].endswith(fullDomain + '/users/' + nickname) or \ - postJsonObject['actor'].endswith(fullDomain + '/users/news'): - print('EDIT TEST 2') + if (postJsonObject['actor'].endswith(fullDomain + '/users/' + nickname) or + (isEditor(baseDir, nickname) and + postJsonObject['actor'].endswith(fullDomain + '/users/news'))): if '/statuses/' in postJsonObject['object']['id']: - print('EDIT TEST 3') if isBlogPost(postJsonObject): - print('EDIT TEST 4') blogPostId = postJsonObject['object']['id'] if not isNewsPost(postJsonObject): - print('EDIT TEST 5') editStr += \ ' ' + \ '\n' else: - print('EDIT TEST 6') editStr += \ ' ' + \ '