mirror of
https://github.com/friendica/friendica
synced 2024-11-18 19:03:40 +00:00
AP: Only reshare stuff that is AP content
This commit is contained in:
parent
ad7b85e0ec
commit
e5d694f7fa
1 changed files with 13 additions and 1 deletions
|
@ -548,7 +548,18 @@ class Transmitter
|
|||
*/
|
||||
private static function getTypeOfItem($item)
|
||||
{
|
||||
if (!empty(Diaspora::isReshare($item['body'], false))) {
|
||||
$reshared = false;
|
||||
|
||||
// Only check for a reshare, if it is a real reshare and no quoted reshare
|
||||
if (strpos($item['body'], "[share") === 0) {
|
||||
$announce = api_share_as_retweet($item);
|
||||
if (!empty($announce['plink'])) {
|
||||
$data = ActivityPub::fetchContent($announce['plink'], $item['uid']);
|
||||
$reshared = !empty($data);
|
||||
}
|
||||
}
|
||||
|
||||
if ($reshared) {
|
||||
$type = 'Announce';
|
||||
} elseif ($item['verb'] == ACTIVITY_POST) {
|
||||
if ($item['created'] == $item['edited']) {
|
||||
|
@ -1018,6 +1029,7 @@ class Transmitter
|
|||
return self::createNote($item);
|
||||
}
|
||||
|
||||
/// @todo Better fetch the real object url.
|
||||
return $announce['plink'];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue