diff options
Diffstat (limited to 'actions/apistatusesdestroy.php')
-rw-r--r-- | actions/apistatusesdestroy.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actions/apistatusesdestroy.php b/actions/apistatusesdestroy.php index 0dfeb4812..485eae66e 100644 --- a/actions/apistatusesdestroy.php +++ b/actions/apistatusesdestroy.php @@ -125,10 +125,10 @@ class ApiStatusesDestroyAction extends ApiAuthAction } if ($this->user->id == $this->notice->profile_id) { - $replies = new Reply; - $replies->get('notice_id', $this->notice_id); - $replies->delete(); - $this->notice->delete(); + if (Event::handle('StartDeleteOwnNotice', array($this->user, $this->notice))) { + $this->notice->delete(); + Event::handle('EndDeleteOwnNotice', array($this->user, $this->notice)); + } $this->showNotice(); } else { $this->clientError( |