From: Evan Prodromou Date: Mon, 22 Feb 2010 04:32:20 +0000 (-0500) Subject: don't save Notices that already exist in Salmon X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e4c4f90c8a303e566fa117fadb0004694b89ccc8;p=quix0rs-gnu-social.git don't save Notices that already exist in Salmon --- diff --git a/plugins/OStatus/actions/usersalmon.php b/plugins/OStatus/actions/usersalmon.php index ca0370bb4e..8368eeccf0 100644 --- a/plugins/OStatus/actions/usersalmon.php +++ b/plugins/OStatus/actions/usersalmon.php @@ -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(); }