]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Added remote join action for group profile
authorSarven Capadisli <csarven@status.net>
Wed, 3 Mar 2010 17:02:10 +0000 (12:02 -0500)
committerSarven Capadisli <csarven@status.net>
Wed, 3 Mar 2010 17:02:10 +0000 (12:02 -0500)
plugins/OStatus/OStatusPlugin.php

index eb777c6b2fb674448f092bfbc5b550c76d7ac37c..014fb0b3808fedd3be9e55ec8d20ae904f36756e 100644 (file)
@@ -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.
      *