From 0027361ec52d49d606fc51fe5a436a19e04caddf Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 21 Aug 2020 21:08:17 +0100 Subject: [PATCH] Get comments enabled state --- daemon.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/daemon.py b/daemon.py index c230a8302..c2e1ea994 100644 --- a/daemon.py +++ b/daemon.py @@ -5521,9 +5521,10 @@ class PubServer(BaseHTTPRequestHandler): mentionsStr = '' if fields.get('mentions'): mentionsStr = fields['mentions'].strip() + ' ' - commentsEnabled = True - if 'commentsEnabled' in fields: - commentsEnabled = fields['commentsEnabled'] + if not fields.get('commentsEnabled'): + commentsEnabled = False + else: + commentsEnabled = True if postType == 'newpost': messageJson = \ createPublicPost(self.server.baseDir,