diff options
author | Evan Prodromou <evan@status.net> | 2010-09-01 14:35:43 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-09-01 14:35:43 -0400 |
commit | c82b1cda825f3b84e3c3bef5474eccf8963b0475 (patch) | |
tree | e05b2c002a8a9a6a370b804afe663174b6cd43d6 /plugins/OStatus/actions | |
parent | 8f06e3b2819936d1a9fe30b1bc44759bdcd56992 (diff) |
send a salmon slap to mentioned person when we reply to a notice
Diffstat (limited to 'plugins/OStatus/actions')
-rw-r--r-- | plugins/OStatus/actions/usersalmon.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/OStatus/actions/usersalmon.php b/plugins/OStatus/actions/usersalmon.php index 641e131ab..54715cd65 100644 --- a/plugins/OStatus/actions/usersalmon.php +++ b/plugins/OStatus/actions/usersalmon.php @@ -71,6 +71,7 @@ class UsersalmonAction extends SalmonAction // Notice must either be a) in reply to a notice by this user // or b) to the attention of this user + // or c) in reply to a notice to the attention of this user $context = $this->activity->context; @@ -79,8 +80,9 @@ class UsersalmonAction extends SalmonAction if (empty($notice)) { throw new ClientException("In reply to unknown notice"); } - if ($notice->profile_id != $this->user->id) { - throw new ClientException("In reply to a notice not by this user"); + if ($notice->profile_id != $this->user->id && + !in_array($notice->getReplies(), $this->user->id)) { + throw new ClientException("In reply to a notice not by this user and not mentioning this user"); } } else if (!empty($context->attention)) { if (!in_array($this->user->uri, $context->attention) && |