]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/atompubmembershipfeed.php
Merge commit 'refs/merge-requests/165' of git://gitorious.org/statusnet/mainline...
[quix0rs-gnu-social.git] / actions / atompubmembershipfeed.php
index b52583314dc6bef2f9a0411b92a02e67fb6cd225..37e4a386a20cfb27e4f4ec6f85f4ced8f55ed3f4 100644 (file)
@@ -141,7 +141,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
 
         // TRANS: Title for group membership feed.
         // TRANS: %s is a username.
-        $feed->setTitle(sprintf(_("%s group memberships"),
+        $feed->setTitle(sprintf(_('Group memberships of %s'),
                                 $this->_profile->getBestName()));
 
         // TRANS: Subtitle for group membership feed.
@@ -237,8 +237,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
 
         if (Event::handle('StartAtomPubNewActivity', array(&$activity))) {
             if ($activity->verb != ActivityVerb::JOIN) {
-                // TRANS: Client error displayed when not using the POST verb.
-                // TRANS: Do not translate POST.
+                // TRANS: Client error displayed when not using the join verb.
                 throw new ClientException(_('Can only handle join activities.'));
                 return;
             }
@@ -275,10 +274,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
                 throw new ClientException(_('Blocked by admin.'));
             }
 
-            if (Event::handle('StartJoinGroup', array($group, $this->auth_user))) {
-                $membership = Group_member::join($group->id, $this->auth_user->id);
-                Event::handle('EndJoinGroup', array($group, $this->auth_user));
-            }
+            $this->auth_user->joinGroup($group);
 
             Event::handle('EndAtomPubNewActivity', array($activity, $membership));
         }