]> git.mxchange.org Git - friendica.git/commitdiff
Addec comments on forum delivery
authorMichael <heluecht@pirati.ca>
Sun, 6 Jun 2021 10:07:21 +0000 (10:07 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 6 Jun 2021 10:07:21 +0000 (10:07 +0000)
src/Model/Item.php
src/Protocol/ActivityPub/Transmitter.php

index 79564946750fd88c78adf856eb79a4fbb03e1e64..769a2898aada743716eb94ee8c574204e51aa70f 100644 (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;
        }
 
index 76bc295d1c4f814d34f1f64a8effdad56c7eb3b1..018fdc7b0f4e403bb680e08e58d24e9d78967b99 100644 (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'];
                                                        }