From b537437c788911dea9105ee77344600b37ab24c0 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 24 Dec 2024 11:17:22 -0500 Subject: [PATCH] feat: save audience into post hash (for remote posts) --- src/posts/create.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/posts/create.js b/src/posts/create.js index 874971d501..869fdf3a05 100644 --- a/src/posts/create.js +++ b/src/posts/create.js @@ -41,8 +41,13 @@ module.exports = function (Posts) { if (data.handle && !parseInt(uid, 10)) { postData.handle = data.handle; } - if (_activitypub && _activitypub.url) { - postData.url = _activitypub.url; + if (_activitypub) { + if (_activitypub.url) { + postData.url = _activitypub.url; + } + if (_activitypub.audience) { + postData.audience = _activitypub.audience; + } } // Rewrite emoji references to inline image assets