Merge branch 'master' of gitorious.org:statusnet/mainline

This commit is contained in:
Evan Prodromou 2012-01-26 11:04:54 -05:00
commit 108d5d8d17

View File

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