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

Commit 44caa3a9 authored by Brion Vibber's avatar Brion Vibber

Consistently send Profiles into Fave::addNew()

parent 80b16c84
......@@ -123,7 +123,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
$fave = Fave::addNew($this->user, $this->notice);
$fave = Fave::addNew($this->user->getProfile(), $this->notice);
if (empty($fave)) {
......@@ -21,7 +21,15 @@ class Fave extends Memcached_DataObject
/* the code above is auto generated do not remove the tag below */
static function addNew($profile, $notice) {
* Save a favorite record.
* @fixme post-author notification should be moved here
* @param Profile $profile the local or remote user who likes
* @param Notice $notice the notice that is liked
* @return mixed false on failure, or Fave record on success
static function addNew(Profile $profile, Notice $notice) {
$fave = null;
......@@ -273,7 +273,7 @@ class FavCommand extends Command
function handle($channel)
$notice = $this->getNotice($this->other);
$fave = Fave::addNew($this->user, $notice);
$fave = Fave::addNew($this->user->getProfile(), $notice);
if (!$fave) {
$channel->error($this->user, _('Could not create favorite.'));
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