OStatus/FeedSub: tweaked PuSH feed garbage collection so other plugins can declare usage of a low-level feed or an OStatus profile besides profile subscriptions & group memberships.
SubMirror: redid add-mirror frontend to accept a feed URL, then pass that on to OStatus, instead of pulling from your subscriptions. Profile: tweaked subscriberCount() so it doesn't subtract 1 for foreign profiles who aren't subscribed to themselves; instead excludes the self-subscription in the count query. Memcached_DataObject: tweak to avoid extra error spew in the DB error raising Work in progress: tweaking feedsub garbage collection so we can count other uses
This commit is contained in:
@@ -479,6 +479,24 @@ class OStatusPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tell the FeedSub infrastructure whether we have any active OStatus
|
||||
* usage for the feed; if not it'll be able to garbage-collect the
|
||||
* feed subscription.
|
||||
*
|
||||
* @param FeedSub $feedsub
|
||||
* @param integer $count in/out
|
||||
* @return mixed hook return code
|
||||
*/
|
||||
function onFeedSubSubscriberCount($feedsub, &$count)
|
||||
{
|
||||
$oprofile = Ostatus_profile::staticGet('feeduri', $feedsub->uri);
|
||||
if ($oprofile) {
|
||||
$count += $oprofile->subscriberCount();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* When about to subscribe to a remote user, start a server-to-server
|
||||
* PuSH subscription if needed. If we can't establish that, abort.
|
||||
|
Reference in New Issue
Block a user