]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/deletenotice.php
add a hook for when someone deletes their own notice
[quix0rs-gnu-social.git] / actions / deletenotice.php
index f8010a814a330f57ae5da3e82b73d16566da017b..68c43040b0a30e85923fbbf180c9e35521b72a37 100644 (file)
@@ -172,7 +172,10 @@ class DeletenoticeAction extends Action
         }
 
         if ($this->arg('yes')) {
-            $this->notice->delete();
+            if (Event::handle('StartDeleteOwnNotice', array($this->user, $this->notice))) {
+                $this->notice->delete();
+                Event::handle('EndDeleteOwnNotice', array($this->user, $this->notice));
+            }
         }
 
         $url = common_get_returnto();