]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apistatusesdestroy.php
Pretty it up a bit more
[quix0rs-gnu-social.git] / actions / apistatusesdestroy.php
index 0dfeb48122df5e8efa43992e5408f26d411aa59e..485eae66eab0c304c0816f828159bc137b029917 100644 (file)
@@ -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(