From 4f446dd48aef85385e20dff1cc65e14c764beeb1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 18 Sep 2021 10:57:03 +0100 Subject: [PATCH] Save posts to a group to the group's outbox --- inbox.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inbox.py b/inbox.py index 7d4d93470..b5ac053d7 100644 --- a/inbox.py +++ b/inbox.py @@ -74,6 +74,7 @@ from utils import dangerousMarkup from utils import isDM from utils import isReply from httpsig import messageContentDigest +from posts import savePostToBox from posts import isCreateInsideAnnounce from posts import createDirectMessagePost from posts import validContentWarning @@ -2163,6 +2164,11 @@ def _sendToGroupMembers(session, baseDir: str, handle: str, port: int, cc = '' nickname = handle.split('@')[0].replace('!', '') + # save to the group outbox so that replies will be to the group + # rather than the original sender + savePostToBox(baseDir, httpPrefix, None, + nickname, domain, postJsonObject, 'outbox') + postId = postJsonObject['object']['id'] if debug: print('Group announce: ' + postId)