summaryrefslogtreecommitdiff
path: root/plugins/OStatus/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-02-25 18:45:32 -0500
committerEvan Prodromou <evan@status.net>2010-02-25 18:45:32 -0500
commit4aa82f75ed692e254c573096168e1cd7c0890ac6 (patch)
tree9fb87849f1f09c69c1c8e1a7c93d76fa283d5330 /plugins/OStatus/actions
parent6578e0e1afed8e8738bbcb31d200927e10074f11 (diff)
parente254c660f66e1a04ac18220c95ef47aa88117e3c (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'plugins/OStatus/actions')
-rw-r--r--plugins/OStatus/actions/ostatussub.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/OStatus/actions/ostatussub.php b/plugins/OStatus/actions/ostatussub.php
index 12832cdcf..aae22f868 100644
--- a/plugins/OStatus/actions/ostatussub.php
+++ b/plugins/OStatus/actions/ostatussub.php
@@ -333,10 +333,18 @@ class OStatusSubAction extends Action
$group = $this->oprofile->localGroup();
if ($user->isMember($group)) {
$this->showForm(_m('Already a member!'));
- } elseif (Group_member::join($this->oprofile->group_id, $user->id)) {
- $this->successGroup();
+ return;
+ }
+ if (Event::handle('StartJoinGroup', array($group, $user))) {
+ $ok = Group_member::join($this->oprofile->group_id, $user->id);
+ if ($ok) {
+ Event::handle('EndJoinGroup', array($group, $user));
+ $this->successGroup();
+ } else {
+ $this->showForm(_m('Remote group join failed!'));
+ }
} else {
- $this->showForm(_m('Remote group join failed!'));
+ $this->showForm(_m('Remote group join aborted!'));
}
} else {
$local = $this->oprofile->localProfile();