]> git.mxchange.org Git - friendica.git/commitdiff
Store "sc:identifier" as GUID as well
authorMichael <heluecht@pirati.ca>
Thu, 5 Mar 2020 08:06:19 +0000 (08:06 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 5 Mar 2020 08:06:19 +0000 (08:06 +0000)
src/Protocol/ActivityPub/Processor.php
src/Protocol/ActivityPub/Receiver.php

index 4fa2d33f764429e6c73702914e7ef04420712acc..b902aa7ff550029c32314dd8f7fffdedbcb45f6d 100644 (file)
@@ -486,7 +486,7 @@ class Processor
 
                $item['created'] = DateTimeFormat::utc($activity['published']);
                $item['edited'] = DateTimeFormat::utc($activity['updated']);
-               $item['guid'] = $activity['diaspora:guid'] ?: self::getGUIDByURL($item['uri']);
+               $item['guid'] = $activity['diaspora:guid'] ?: $activity['sc:identifier'] ?: self::getGUIDByURL($item['uri']);
 
                $item = self::processContent($activity, $item);
                if (empty($item)) {
index 21aba50944f7448bcc9b9411bf86e150526582e2..daca873365ac027da878064d728cc364d504fc14 100644 (file)
@@ -983,6 +983,7 @@ class Receiver
                        $actor = JsonLD::fetchElement($object, 'as:actor', '@id');
                }
 
+               $object_data['sc:identifier'] = JsonLD::fetchElement($object, 'sc:identifier', '@value');
                $object_data['diaspora:guid'] = JsonLD::fetchElement($object, 'diaspora:guid', '@value');
                $object_data['diaspora:comment'] = JsonLD::fetchElement($object, 'diaspora:comment', '@value');
                $object_data['diaspora:like'] = JsonLD::fetchElement($object, 'diaspora:like', '@value');