]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apigroupjoin.php
Remove trailing whitespace in UI text.
[quix0rs-gnu-social.git] / actions / apigroupjoin.php
index 2e35cb87de364636e247e95953507703bc7f8069..6f3df0d8cd17a7274921c1f14cf65964b5654e28 100644 (file)
@@ -126,10 +126,7 @@ class ApiGroupJoinAction extends ApiAuthAction
         }
 
         try {
-            if (Event::handle('StartJoinGroup', array($this->group, $this->user))) {
-                Group_member::join($this->group->id, $this->user->id);
-                Event::handle('EndJoinGroup', array($this->group, $this->user));
-            }
+            $this->user->joinGroup($this->group);
         } catch (Exception $e) {
             // TRANS: Server error displayed when joining a group failed in the database.
             // TRANS: %1$s is the joining user's nickname, $2$s is the group nickname for which the join failed.
@@ -147,7 +144,7 @@ class ApiGroupJoinAction extends ApiAuthAction
             break;
         default:
             $this->clientError(
-                // TRANS: Client error displayed trying to execute an unknown API method joining a group.
+                // TRANS: Client error displayed when coming across a non-supported API method.
                 _('API method not found.'),
                 404,
                 $this->format