From: Michael Date: Thu, 5 Mar 2020 08:06:19 +0000 (+0000) Subject: Store "sc:identifier" as GUID as well X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9390748187465803a67e4e2fe80411bb43e725a2;p=friendica.git Store "sc:identifier" as GUID as well --- diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 4fa2d33f76..b902aa7ff5 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -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)) { diff --git a/src/Protocol/ActivityPub/Receiver.php b/src/Protocol/ActivityPub/Receiver.php index 21aba50944..daca873365 100644 --- a/src/Protocol/ActivityPub/Receiver.php +++ b/src/Protocol/ActivityPub/Receiver.php @@ -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');