From 3872426f3583babada9b8e2d702a63c222bea3a1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 13 Dec 2020 18:24:25 +0000 Subject: [PATCH] Ensure that mentions appear in cc --- posts.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/posts.py b/posts.py index 01d8b9fd6..115cbf344 100644 --- a/posts.py +++ b/posts.py @@ -898,6 +898,16 @@ def createPostBase(baseDir: str, nickname: str, domain: str, port: int, if eventUUID: postObjectType = 'Event' + # public posts with mentions should include the mentioned + # actors within CC + # "I think we don’t notify about mentions unless the person + # is also addressed in to/cc" -- gargron + if toRecipients and toCC and mentionedRecipients: + if len(toRecipients) == 1 and len(toCC) == 1: + if toRecipients[0].endswith('#Public') and \ + toCC[0].endswith('/followers'): + toCC += mentionedRecipients + if not clientToServer: actorUrl = httpPrefix + '://' + domain + '/users/' + nickname