]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub/Transmitter.php
Merge remote-tracking branch 'upstream/develop' into reshare-delivery
[friendica.git] / src / Protocol / ActivityPub / Transmitter.php
index aebf59891271cdc30cce93bbd50b35f63b0ed669..b28ee4452e0c47112147a55b98b91bfd426ee536 100644 (file)
@@ -363,7 +363,7 @@ class Transmitter
                        }
                }
 
-               if (Config::get('debug', 'total_ap_delivery')) {
+               if (self::isAnnounce($item) || Config::get('debug', 'total_ap_delivery')) {
                        // Will be activated in a later step
                        $networks = Protocol::FEDERATED;
                } else {
@@ -1423,6 +1423,23 @@ class Transmitter
                return ['object' => $reshared_item, 'actor' => $profile, 'comment' => $reshared['comment']];
        }
 
+       /**
+        * Checks if the provided item array is an announce
+        *
+        * @param array $item
+        *
+        * @return boolean
+        */
+       public static function isAnnounce($item)
+       {
+               $announce = self::getAnnounceArray($item);
+               if (empty($announce)) {
+                       return false;
+               }
+
+               return empty($announce['comment']);
+       }
+
        /**
         * Creates an activity id for a given contact id
         *