OStatus group delivery initial implementation.
- added rel="ostatus:attention" links for group delivery - added events for plugins to override group profile/permalink pages - pulled Notice::saveGroups up to save-time so we can override; it's relatively cheap and gives us a clean list of target groups for distrib time even with customized delivery. - fixed notice::getGroups to return group objects as expected - added some doc on new parameters to Notice::saveNew - 'groups' list of group IDs to push to in place of parsing - messages that come in via PuSH and contain local group targets are delivered to local group members - messages that come in via PuSH and contain remote group targets are delivered to local members of the remote group Todo: - handle group posts that only come through Salmon - handle conflicts in case something comes in both through Salmon and PuSH - better source verification - need a cleaner interface to look up groups by URI - need a way to handle remote groups with conflicting names
This commit is contained in:
@@ -591,6 +591,22 @@ class OStatusPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onStartUserGroupHomeUrl($group, &$url)
|
||||
{
|
||||
return $this->onStartUserGroupPermalink($group, &$url);
|
||||
}
|
||||
|
||||
function onStartUserGroupPermalink($group, &$url)
|
||||
{
|
||||
$oprofile = Ostatus_profile::staticGet('group_id', $group->id);
|
||||
if ($oprofile) {
|
||||
// @fixme this should probably be in the user_group table
|
||||
// @fixme this uri not guaranteed to be a profile page
|
||||
$url = $oprofile->uri;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function onStartShowSubscriptionsContent($action)
|
||||
{
|
||||
$user = common_current_user();
|
||||
|
Reference in New Issue
Block a user