X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FDiaspora.php;h=f7d94256eeaea5ffd654ab39b62686d49fe25a1b;hb=9dff3d2b6d27a3917b7ca998c5d33c7b7cbaa84a;hp=e341de208033148971c7cb2e86246277ccc7cff3;hpb=bbac95d692f607caf15002d9ef7a00748e10cb66;p=friendica.git diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index e341de2080..f7d94256ee 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -37,6 +37,7 @@ use Friendica\Util\Map; use Friendica\Util\Network; use Friendica\Util\Strings; use Friendica\Util\XML; +use Friendica\Worker\Delivery; use SimpleXMLElement; /** @@ -2147,13 +2148,9 @@ class Diaspora if ($comment['id'] == $comment['parent']) { continue; } - if ($comment['verb'] == ACTIVITY_POST) { - $cmd = $comment['self'] ? 'comment-new' : 'comment-import'; - } else { - $cmd = $comment['self'] ? 'like' : 'comment-import'; - } - Logger::log("Send ".$cmd." for item ".$comment['id']." to contact ".$contact_id, Logger::DEBUG); - Worker::add(PRIORITY_HIGH, 'Delivery', $cmd, $comment['id'], $contact_id); + + Logger::info('Deliver participation', ['item' => $comment['id'], 'contact' => $contact_id]); + Worker::add(PRIORITY_HIGH, 'Delivery', Delivery::POST, $comment['id'], $contact_id); } DBA::close($comments); @@ -3546,7 +3543,7 @@ class Diaspora $public = ($item["private"] ? "false" : "true"); $created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM); - $edited = DateTimeFormat::utc($item["edited"], DateTimeFormat::ATOM); + $edited = DateTimeFormat::utc($item["edited"] ?? $item["created"], DateTimeFormat::ATOM); // Detect a share element and do a reshare if (!$item['private'] && ($ret = self::isReshare($item["body"]))) {