don't save Notices that already exist in Salmon

This commit is contained in:
Evan Prodromou 2010-02-21 23:32:20 -05:00
parent 48839a1fcf
commit e4c4f90c8a

View File

@ -88,6 +88,12 @@ class UsersalmonAction extends SalmonAction
throw new ClientException("Not to anyone in reply to anything!"); 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(); $this->saveNotice();
} }