add displayName and targetUrl to activity JSON
This commit is contained in:
parent
71fa1d2462
commit
b475c871a4
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user