]> git.mxchange.org Git - friendica.git/commitdiff
Transmit the Diaspora GUID with activities (Like, Dislike, ...)
authorMichael <heluecht@pirati.ca>
Sat, 6 Oct 2018 14:02:23 +0000 (14:02 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 6 Oct 2018 14:02:23 +0000 (14:02 +0000)
src/Protocol/ActivityPub/Receiver.php
src/Protocol/ActivityPub/Transmitter.php

index d3b38f9ee34068652f3f24d173eef5bbd663e8b1..1c237f79dc22e60e0fdda808911bab3e4c1e9d0d 100644 (file)
@@ -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');
                }
index 081ba0b7399231ae682b2c6d38a5bada3d20b639..9fad787b1b19586daa97d29f97c157a00745b80d 100644 (file)
@@ -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'];
                }