summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--privatemsg.api.php19
-rw-r--r--privatemsg.module4
2 files changed, 23 insertions, 0 deletions
diff --git a/privatemsg.api.php b/privatemsg.api.php
index f402b6c..3b03c0f 100644
--- a/privatemsg.api.php
+++ b/privatemsg.api.php
@@ -618,5 +618,24 @@ function hook_privatemsg_name_lookup_matches(&$matches, $string) {
}
/**
+ * Allows response to a successful operation.
+ *
+ * @param $operation
+ * The operation that was executed.
+ * @param $threads
+ * An array which contains the thread ids on which the operation
+ * has been executed.
+ * @param $account
+ * An user account object if an other user than the currrently logged in is
+ * affected.
+ *
+ * @see privatemsg_operation_execute()
+ * @see hook_privatemsg_thread_operations()
+ */
+function hook_privatemsg_operation_executed($operation, $threads, $account = NULL) {
+
+}
+
+/**
* @}
*/
diff --git a/privatemsg.module b/privatemsg.module
index 1f5312d..b193b98 100644
--- a/privatemsg.module
+++ b/privatemsg.module
@@ -2119,6 +2119,10 @@ function privatemsg_operation_execute($operation, $threads, $account = null) {
drupal_set_message(t('The previous action can be <a href="!undo">undone</a>.', array('!undo' => $undo)));
}
+
+ // Allow modules to respond to the operation.
+ module_invoke_all('privatemsg_operation_executed', $operation, $threads, $account);
+
return TRUE;
}