]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Delivery.php
Merge pull request #7907 from nupplaphil/task/reduce_app_deps
[friendica.git] / src / Worker / Delivery.php
index e59ea37aad35a4d0bd7c678de53e512c0c327677..da0c8f2adb4da018364f11cfff755c212a0ec5e2 100644 (file)
@@ -251,17 +251,13 @@ class Delivery extends BaseObject
         */
        private static function deliverDFRN($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup)
        {
-/*
-               if (Diaspora::isReshare($target_item['body'])) {
-                       // Transmit Diaspora reshares only via Diaspora
+               // Transmit Diaspora reshares via Diaspora if the Friendica contact support Diaspora
+               if (Diaspora::isReshare($target_item['body']) && !empty(Diaspora::personByHandle(contact['addr'], false))) {
+                       Logger::info('Reshare will be transmitted via Diaspora', ['url' => $contact['url'], 'guid' => ($target_item['guid'] ?? '') ?: $target_item['id']]);
                        self::deliverDiaspora($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup);
                        return;
                }
 
-               if (ActivityPub\Transmitter::::isAnnounce($target_item) && getby) {
-                       return;
-               }
-*/
                Logger::info('Deliver ' . (($target_item['guid'] ?? '') ?: $target_item['id']) . ' via DFRN to ' . (($contact['addr'] ?? '') ?: $contact['url']));
 
                if ($cmd == self::MAIL) {