use Subscription::start() for remote subscribes

This commit is contained in:
Evan Prodromou 2010-02-24 15:20:06 -05:00
parent daea988786
commit 269d567d94
1 changed files with 2 additions and 12 deletions

View File

@ -299,18 +299,9 @@ class Ostatus_profile extends Memcached_DataObject
throw new ServerException("Remote groups can't subscribe to local users"); throw new ServerException("Remote groups can't subscribe to local users");
} }
// @fixme use regular channels for subbing, once they accept remote profiles Subscription::start($this->localProfile(), $user->getProfile());
$sub = new Subscription();
$sub->subscriber = $this->profile_id;
$sub->subscribed = $user->id;
$sub->created = common_sql_now(); // current time
if ($sub->insert()) { return true;
// @fixme use subs_notify() if refactored to take profiles?
mail_subscribe_notify_profile($user, $this->localProfile());
return true;
}
return false;
} }
/** /**
@ -1127,7 +1118,6 @@ class Ostatus_profile extends Memcached_DataObject
} }
} }
protected static function getActivityObjectNickname($object, $hints=array()) protected static function getActivityObjectNickname($object, $hints=array())
{ {
if ($object->poco) { if ($object->poco) {