Browse Source

Transmit the Diaspora GUID with activities (Like, Dislike, ...)

pull/5843/head
Michael 3 years ago
parent
commit
389a651005
  1. 4
      src/Protocol/ActivityPub/Receiver.php
  2. 1
      src/Protocol/ActivityPub/Transmitter.php

4
src/Protocol/ActivityPub/Receiver.php

@ -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');
}

1
src/Protocol/ActivityPub/Transmitter.php

@ -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'];
}

Loading…
Cancel
Save