]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/actions/usersalmon.php
Check that the user is in the context of a salmon slap
[quix0rs-gnu-social.git] / plugins / OStatus / actions / usersalmon.php
index 5d2a92d99b3d93da1d821fc8bfc9931d190f9122..cd24dff3aca87f691e33d97ecc65f40784c593d9 100644 (file)
@@ -71,30 +71,6 @@ class UsersalmonAction extends SalmonAction
             throw new ClientException(_m('Cannot handle that kind of post.'));
         }
 
-        // Notice must either be a) in reply to a notice by this user
-        // or b) in reply to a notice to the attention of this user
-        // or c) to the attention of this user
-
-        $context = $this->activity->context;
-        $notice = false;
-
-        if (!empty($context->replyToID)) {
-            $notice = Notice::getKV('uri', $context->replyToID);
-        }
-
-        if ($notice instanceof Notice &&
-            ($notice->profile_id == $this->target->id ||
-             array_key_exists($this->target->id, $notice->getReplies())))
-        {
-            // In reply to a notice either from or mentioning this user.
-        } elseif (!empty($context->attention) &&
-                   array_key_exists($this->target->getUri(), $context->attention)) {
-            // To the attention of this user.
-        } else {
-            // TRANS: Client exception.
-            throw new ClientException(_m('Not to anyone in reply to anything.'));
-        }
-
         try {
             $this->saveNotice();
         } catch (AlreadyFulfilledException $e) {