X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapistatusesdestroy.php;h=485eae66eab0c304c0816f828159bc137b029917;hb=e4b084f093dd7e8697616058874ec4ab15aacf2b;hp=0dfeb48122df5e8efa43992e5408f26d411aa59e;hpb=cd29d3d646379aa9a1352035973c8e379cc7f42b;p=quix0rs-gnu-social.git diff --git a/actions/apistatusesdestroy.php b/actions/apistatusesdestroy.php index 0dfeb48122..485eae66ea 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(