]> git.mxchange.org Git - friendica.git/commitdiff
Partly revert coding for compatibility issues
authorMichael <heluecht@pirati.ca>
Mon, 10 Aug 2020 13:59:51 +0000 (13:59 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 10 Aug 2020 13:59:51 +0000 (13:59 +0000)
src/Model/Item.php
src/Protocol/ActivityPub/Transmitter.php

index b486ee53a3572c768f8611794a7a4cdeeca3cf0e..1c61dfcdd34635cd9b8539d15716d47d40b9c98c 100644 (file)
@@ -2701,7 +2701,9 @@ class Item
 
                Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], 'Notifier', Delivery::POST, $item_id);
 
-               Item::performActivity($item_id, 'announce', $uid);
+               /// @todo This code should be activated by the end of the year 2020
+               // See also "createActivityFromItem"
+               //Item::performActivity($item_id, 'announce', $uid);
 
                return false;
        }
index 563e7b458e9a2b3d517c1f21a76bb1b533cebd21..5768c4439a60d5a459df7d518ff0e855cb6a8cfe 100644 (file)
@@ -863,6 +863,21 @@ class Transmitter
                        return false;
                }
 
+               /// @todo This code should be removed by the end of the year 2020
+               if ($item['wall'] && ($item['uri'] == $item['parent-uri'])) {
+                       $owner = User::getOwnerDataById($item['uid']);
+                       if (($owner['account-type'] == User::ACCOUNT_TYPE_COMMUNITY) && ($item['author-link'] != $owner['url'])) {
+                               $type = 'Announce';
+
+                               // Disguise forum posts as reshares. Will later be converted to a real announce
+                               $item['body'] = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'],
+                                       $item['plink'], $item['created'], $item['guid']) . $item['body'] . '[/share]';
+                       }
+               }
+
+               /*
+               /// @todo This code should be activated by the end of the year 2020             
+               // See also "tagDeliver";
                // In case of a forum post ensure to return the original post if author and forum are on the same machine
                if (!empty($item['forum_mode'])) {
                        $author = Contact::getById($item['author-id'], ['nurl']);
@@ -873,6 +888,7 @@ class Transmitter
                                }
                        }
                }
+               */
 
                if (empty($type)) {
                        $condition = ['item-uri' => $item['uri'], 'protocol' => Conversation::PARCEL_ACTIVITYPUB];