From a7f5c1f4c63136901a72269ec0fdfb1f6db3e4e5 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 15 Sep 2018 23:06:03 +0000 Subject: [PATCH] Likes work now --- src/Protocol/ActivityPub.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Protocol/ActivityPub.php b/src/Protocol/ActivityPub.php index 19407b825b..85d21d7cba 100644 --- a/src/Protocol/ActivityPub.php +++ b/src/Protocol/ActivityPub.php @@ -34,7 +34,7 @@ use Friendica\Network\Probe; * https://tools.ietf.org/html/draft-cavage-http-signatures-10#ref-15 * * Part of the code for HTTP signing is taken from the Osada project. - * + * https://framagit.org/macgirvin/osada * * To-do: * @@ -49,6 +49,7 @@ use Friendica\Network\Probe; * General: * - Message distribution * - Endpoints: Outbox, Object, Follower, Following + * - General cleanup */ class ActivityPub { @@ -676,6 +677,19 @@ class ActivityPub } elseif (in_array($activity['type'], ['Undo'])) { $item['object'] = self::processElement($activity, 'object', 'object', 'type', 'Follow'); } else { + $item['uri'] = $activity['id']; + $item['author'] = $activity['actor']; + $item['updated'] = $item['published'] = $activity['published']; + $item['uuid'] = ''; + $item['name'] = $activity['type']; + $item['summary'] = ''; + $item['content'] = ''; + $item['location'] = ''; + $item['tags'] = []; + $item['sensitive'] = false; + $item['service'] = ''; + $item['attachments'] = []; + $item['conversation'] = ''; $item['object'] = $object_url; } $item['id'] = $activity['id']; -- 2.39.5