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
$notice->update($original);
}
}
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