]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/actions/usersalmon.php
Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / plugins / OStatus / actions / usersalmon.php
index 7fce6c808c5118fba49450ce95049fd4973cd2c1..5d2a92d99b3d93da1d821fc8bfc9931d190f9122 100644 (file)
@@ -95,13 +95,11 @@ class UsersalmonAction extends SalmonAction
             throw new ClientException(_m('Not to anyone in reply to anything.'));
         }
 
-        $existing = Notice::getKV('uri', $this->activity->objects[0]->id);
-        if ($existing instanceof Notice) {
-            common_log(LOG_ERR, "Not saving notice with duplicate URI '".$existing->getUri()."' (seems it already exists).");
+        try {
+            $this->saveNotice();
+        } catch (AlreadyFulfilledException $e) {
             return;
         }
-
-        $this->saveNotice();
     }
 
     /**