]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't save Notices that already exist in Salmon
authorEvan Prodromou <evan@status.net>
Mon, 22 Feb 2010 04:32:20 +0000 (23:32 -0500)
committerEvan Prodromou <evan@status.net>
Mon, 22 Feb 2010 04:32:20 +0000 (23:32 -0500)
plugins/OStatus/actions/usersalmon.php

index ca0370bb4e7dcc29f6549e2466a524e1f9706cf8..8368eeccf0b59a23e573e0e0734071808a022b17 100644 (file)
@@ -88,6 +88,12 @@ class UsersalmonAction extends SalmonAction
             throw new ClientException("Not to anyone in reply to anything!");
         }
 
+        $existing = Notice::staticGet('uri', $this->act->object->id);
+
+        if (!empty($existing)) {
+            common_log(LOG_ERR, "Not saving notice '{$existing->uri}'; already exists.");
+        }
+
         $this->saveNotice();
     }