Improved ID detection
This commit is contained in:
parent
e5d694f7fa
commit
9e7c59481f
|
@ -1029,8 +1029,17 @@ class Transmitter
|
||||||
return self::createNote($item);
|
return self::createNote($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @todo Better fetch the real object url.
|
// Fetch the original id of the object
|
||||||
return $announce['plink'];
|
$activity = ActivityPub::fetchContent($announce['plink'], $item['uid']);
|
||||||
|
if (!empty($activity)) {
|
||||||
|
$ldactivity = JsonLD::compact($activity);
|
||||||
|
$id = JsonLD::fetchElement($ldactivity, '@id');
|
||||||
|
if (!empty($id)) {
|
||||||
|
return $id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return self::createNote($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue