From: Sarven Capadisli Date: Wed, 3 Mar 2010 17:02:10 +0000 (-0500) Subject: Added remote join action for group profile X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=11750e832f994013b2fbce860bd24d24f49a14db;p=quix0rs-gnu-social.git Added remote join action for group profile --- diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index eb777c6b2f..014fb0b380 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -210,6 +210,26 @@ class OStatusPlugin extends Plugin return false; } + function onStartGroupSubscribe($output, $group) + { + $cur = common_current_user(); + + if (empty($cur)) { + // Add an OStatus subscribe + $output->elementStart('li', 'entity_subscribe'); + $url = common_local_url('ostatusinit', + array('nickname' => $group->nickname)); + $output->element('a', array('href' => $url, + 'class' => 'entity_remote_subscribe'), + _m('Join')); + + $output->elementEnd('li'); + } + + return false; + } + + /** * Check if we've got remote replies to send via Salmon. *