From e4c4f90c8a303e566fa117fadb0004694b89ccc8 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 21 Feb 2010 23:32:20 -0500 Subject: [PATCH] don't save Notices that already exist in Salmon --- plugins/OStatus/actions/usersalmon.php | 6 ++++++ 1 file changed, 6 insertions(+) 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(); } -- 2.39.5