diff --git a/classes/Notice.php b/classes/Notice.php index 17e0c5a0f9..a3886d1658 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -60,6 +60,7 @@ class Notice extends Memcached_DataObject function delete() { $this->blowCaches(); $this->blowFavesCache(); + $this->blowInboxes(); parent::delete(); } @@ -359,5 +360,17 @@ class Notice extends Memcached_DataObject return; } + + # Delete from inboxes if we're deleted. + + function blowInboxes() { + + $inbox = new Notice_inbox(); + $inbox->notice_id = $this->id; + $inbox->delete(); + + return; + } + }