}
}
- 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 {
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
*