Merge pull request #5843 from annando/guid-like

Transmit the Diaspora GUID with activities (Like, Dislike, ...)
This commit is contained in:
Tobias Diekershoff 2018-10-06 16:49:16 +02:00 committed by GitHub
commit 1551570b7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -432,6 +432,10 @@ class Receiver
$object_data['updated'] = $activity['updated'];
}
if (!empty($activity['diaspora:guid']) && empty($object_data['diaspora:guid'])) {
$object_data['diaspora:guid'] = $activity['diaspora:guid'];
}
if (!empty($activity['inReplyTo']) && empty($object_data['parent-uri'])) {
$object_data['parent-uri'] = JsonLD::fetchElement($activity, 'inReplyTo', 'id');
}

View File

@ -554,6 +554,7 @@ class Transmitter
} elseif ($data['type'] == 'Undo') {
$data['object'] = self::createActivityFromItem($item_id, true);
} else {
$data['diaspora:guid'] = $item['guid'];
$data['object'] = $item['thr-parent'];
}