X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FDiaspora.php;h=f7d94256eeaea5ffd654ab39b62686d49fe25a1b;hb=9dff3d2b6d27a3917b7ca998c5d33c7b7cbaa84a;hp=ac1cf9c38d469793b7d7179de1cca1a0707167b0;hpb=8c5923bb4667ff9b0375fb9d276ff1c4e4f8e2da;p=friendica.git diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index ac1cf9c38d..f7d94256ee 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -2148,13 +2148,9 @@ class Diaspora if ($comment['id'] == $comment['parent']) { continue; } - if ($comment['verb'] == ACTIVITY_POST) { - $cmd = $comment['self'] ? Delivery::COMMENT : 'comment-import'; - } else { - $cmd = $comment['self'] ? Delivery::ACTIVITY : 'activity-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); @@ -3547,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"]))) {