From: Michael Date: Sat, 6 Oct 2018 14:02:23 +0000 (+0000) Subject: Transmit the Diaspora GUID with activities (Like, Dislike, ...) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=389a651005d13677c49fef60c59943eb4a002b8b;p=friendica.git Transmit the Diaspora GUID with activities (Like, Dislike, ...) --- diff --git a/src/Protocol/ActivityPub/Receiver.php b/src/Protocol/ActivityPub/Receiver.php index d3b38f9ee3..1c237f79dc 100644 --- a/src/Protocol/ActivityPub/Receiver.php +++ b/src/Protocol/ActivityPub/Receiver.php @@ -432,6 +432,10 @@ class Receiver $object_data['updated'] = $activity['updated']; } + if (!empty($activity['diaspora:guid']) && empty($object_data['diaspora:guid'])) { + $object_data['diaspora:guid'] = $activity['diaspora:guid']; + } + if (!empty($activity['inReplyTo']) && empty($object_data['parent-uri'])) { $object_data['parent-uri'] = JsonLD::fetchElement($activity, 'inReplyTo', 'id'); } diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index 081ba0b739..9fad787b1b 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -554,6 +554,7 @@ class Transmitter } elseif ($data['type'] == 'Undo') { $data['object'] = self::createActivityFromItem($item_id, true); } else { + $data['diaspora:guid'] = $item['guid']; $data['object'] = $item['thr-parent']; }