From 966dff99218dc8c52006d5bc62bda6a2fae7d54d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 13 Dec 2020 20:30:08 +0000 Subject: [PATCH] Fix reply unit test --- posts.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/posts.py b/posts.py index 0d371501..b5c3cd3b 100644 --- a/posts.py +++ b/posts.py @@ -1012,6 +1012,16 @@ def createPostBase(baseDir: str, nickname: str, domain: str, port: int, if newPost.get('object'): newPost['object']['cc'] = [ccUrl] + # if this is a public post then include any mentions in cc + toCC = newPost['object']['cc'] + if len(toRecipients) == 1: + if toRecipients[0].endswith('#Public') and \ + ccUrl.endswith('/followers'): + for tag in tags: + if tag['type'] == 'Mention': + if tag['href'] not in toCC: + toCC.append(tag['href']) + # if this is a moderation report then add a status if isModerationReport: # add status