We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit b475c871 authored by Evan Prodromou's avatar Evan Prodromou

add displayName and targetUrl to activity JSON

parent 71fa1d24
......@@ -572,4 +572,20 @@ class BookmarkPlugin extends MicroAppPlugin
public function activityObjectOutputJson(ActivityObject $obj, array &$out)
assert($obj->type == ActivityObject::BOOKMARK);
$bm = Bookmark::staticGet('uri', $obj->id);
if (empty($bm)) {
throw new ServerException("Unknown bookmark: " . $obj->id);
$out['displayName'] = $bm->title;
$out['targetUrl'] = $bm->url;
return true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment