summaryrefslogtreecommitdiff
path: root/plugins/OStatus/OStatusPlugin.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-02-19 16:55:24 -0500
committerEvan Prodromou <evan@status.net>2010-02-19 16:55:24 -0500
commitd69f6dff6a0b62ddab929f6ba0801533a9031162 (patch)
tree2b49953ca2b5306a512f90e5d780cbe07d225b3c /plugins/OStatus/OStatusPlugin.php
parentb0327506a491f029b239ae703e1acb1d42ae299c (diff)
parenta1a3ab1c58cf8636c4e9ac6b9d44bdc18946a547 (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Conflicts: plugins/OStatus/actions/salmon.php
Diffstat (limited to 'plugins/OStatus/OStatusPlugin.php')
-rw-r--r--plugins/OStatus/OStatusPlugin.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php
index 4ebe4551e..4c43d8a30 100644
--- a/plugins/OStatus/OStatusPlugin.php
+++ b/plugins/OStatus/OStatusPlugin.php
@@ -253,17 +253,22 @@ class OStatusPlugin extends Plugin
*/
function onEndUnsubscribe($user, $other)
{
+ if ($user instanceof Profile) {
+ $profile = $user;
+ } else if ($user instanceof Profile) {
+ $profile = $user->getProfile();
+ }
$oprofile = Ostatus_profile::staticGet('profile_id', $other->id);
if ($oprofile) {
// Notify the remote server of the unsub, if supported.
- $oprofile->notify($user->getProfile(), ActivityVerb::UNFOLLOW, $oprofile);
+ $oprofile->notify($profile, ActivityVerb::UNFOLLOW, $oprofile);
// Drop the PuSH subscription if there are no other subscribers.
$sub = new Subscription();
$sub->subscribed = $other->id;
$sub->limit(1);
if (!$sub->find(true)) {
- common_log(LOG_INFO, "Unsubscribing from now-unused feed $oprofile->feeduri on hub $oprofile->huburi");
+ common_log(LOG_INFO, "Unsubscribing from now-unused feed $oprofile->feeduri");
$oprofile->unsubscribe();
}
}