forked from GNUsocial/gnu-social
Make better use of Subscription class
removed lib/subs.php as it was essentially only a wrapper for Subscription
This commit is contained in:
@@ -235,11 +235,11 @@ function newSub($i)
|
||||
|
||||
$to = User::getKV('nickname', $tunic);
|
||||
|
||||
if (empty($to)) {
|
||||
if (!($to instanceof User)) {
|
||||
throw new Exception("Can't find user '$tunic'.");
|
||||
}
|
||||
|
||||
subs_subscribe_to($from, $to);
|
||||
Subscription::start($from->getProfile(), $to->getProfile());
|
||||
|
||||
$from->free();
|
||||
$to->free();
|
||||
|
||||
Reference in New Issue
Block a user