OStatus: fix regressions in plugin & usersalmon action. Sub/unsub notifications are working again.

This commit is contained in:
Brion Vibber
2010-02-20 10:20:42 -08:00
parent 97b01432e7
commit f891b135fb
2 changed files with 189 additions and 22 deletions

View File

@@ -357,26 +357,4 @@ class OStatusPlugin extends Plugin
return true;
}
function onEndUnsubscribe($subscriber, $other)
{
$user = User::staticGet('id', $subscriber->id);
if (empty($user)) {
return true;
}
$oprofile = Ostatus_profile::staticGet('profile_id', $other->id);
if (empty($oprofile)) {
return true;
}
// We have a local user subscribing to a remote profile; make the
// magic happen!
$oprofile->notify($subscriber, ActivityVerb::UNFOLLOW);
return true;
}
}