1
0
Fork 0

Addec comments on forum delivery

This commit is contained in:
Michael 2021-06-06 10:07:21 +00:00
parent 73b0af52fb
commit 56f07d412b
2 changed files with 12 additions and 3 deletions

View file

@ -1909,6 +1909,15 @@ class Item
return false;
}
self::performActivity($item['id'], 'announce', $uid);
/**
* All the following lines are only needed for private forums and compatibility to older systems without AP support.
* A possible way would be that the followers list of a forum would always be readable by all followers.
* So this would mean that the comment distribution could be done exactly for the intended audience.
* Or possibly we could store the receivers that had been in the "announce" message above and use this.
*/
// now change this copy of the post to a forum head message and deliver to all the tgroup members
$self = DBA::selectFirst('contact', ['id', 'name', 'url', 'thumb'], ['uid' => $uid, 'self' => true]);
if (!DBA::isResult($self)) {
@ -1942,8 +1951,6 @@ class Item
Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], 'Notifier', Delivery::POST, (int)$item['uri-id'], (int)$item['uid']);
self::performActivity($item['id'], 'announce', $uid);
return false;
}

View file

@ -618,7 +618,9 @@ class Transmitter
}
}
} elseif (!$exclusive) {
// Public thread parent post always are directed to the followers
// Public thread parent post always are directed to the followers.
// This mustn't be done by posts that are directed to forum servers via the exclusive mention.
// But possibly in that case we could add the "followers" collection of the forum to the message.
if (($item['private'] != Item::PRIVATE) && !$forum_mode) {
$data['cc'][] = $actor_profile['followers'];
}