check all audience fields when determining if a post is direct to group (Masto apprently uses only cc)

This commit is contained in:
Will Murphy 2021-11-04 23:27:23 -05:00
parent 6216ad02a8
commit fdbc15c630

View file

@ -98,7 +98,7 @@ app.on('apex-inbox', async ({ actor, activity, recipient, object }) => {
switch (activity.type.toLowerCase()) { switch (activity.type.toLowerCase()) {
// automatically reshare incoming posts // automatically reshare incoming posts
case 'create': { case 'create': {
if (!activity.to?.includes(recipient.id)) { if (!apex.audienceFromActivity(activity).includes(recipient.id)) {
// ignore forwarded messages that aren't directly adddressed to group // ignore forwarded messages that aren't directly adddressed to group
return return
} }