1
0
Fork 0

Store "sc:identifier" as GUID as well

This commit is contained in:
Michael 2020-03-05 08:06:19 +00:00
parent 44eebde9cb
commit 9390748187
2 changed files with 2 additions and 1 deletions

View 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)) {

View 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');