Index: actions.inc
===================================================================
--- actions.inc	(revision 168)
+++ actions.inc	(revision 171)
@@ -326,7 +326,10 @@
           '%teaser' => strip_tags($node->teaser),
           '%body' => strip_tags($node->body)
            );
-
+        if (module_exists('token')) {
+          $subject = token_replace($subject, 'node', $node);
+          $message = token_replace($message, 'node', $node);
+        }
         $subject = strtr($subject, $variables);
         $subject = str_replace(array("\r", "\n"), '', $subject);
         $message = strtr($message, $variables);
@@ -372,6 +375,18 @@
         '#rows' => '20',
         '#description' => t('The message that should be sent.  You may include the following variables: %site_name, %username, %node_url, %node_type, %title, %teaser, %body'),
       );
+      if (module_exists('token')) {
+        $form['token_help'] = array(
+        '#title' => t('Replacement patterns'),
+        '#type' => 'fieldset',
+        '#collapsible' => TRUE,
+        '#collapsed' => TRUE,
+        '#description' => t('Prefer raw-text replacements for text to avoid problems with HTML entities!'),
+        );
+        $form['token_help']['help'] = array(
+          '#value' => theme('token_help', 'node'),
+        );
+      }
       return $form;
 
      // validate the HTML form
@@ -399,7 +414,7 @@
 
 /**
  * Implementation of a Drupal action.
- * 
+ *
  * Sends a configurable message to the current user's screen.
  */
 function action_set_message($op, $edit = array(), &$node) {
@@ -410,7 +425,7 @@
         '%site_name' => variable_get('site_name', 'drupal'),
         '%username' => $user->name ? $user->name : variable_get('anonymous', 'Anonymous'),
       );
-      
+
       if (isset($node) && is_object($node)) {
         $variables += array(
           '%uid' => $node->uid,
@@ -420,6 +435,9 @@
           '%teaser' => strip_tags($node->teaser),
           '%body' => strip_tags($node->body),
         );
+        if (module_exists('token')) {
+          $edit['message'] = token_replace($edit['message'], 'node', $node);
+        }
       }
       $edit['message'] = strtr($edit['message'], $variables);
       drupal_set_message($edit['message']);
@@ -443,6 +461,18 @@
         '#rows' => '8',
         '#description' => t('The message to be displayed to the current user.  You may include the following variables: %site_name, %username, %node_url, %node_type, %title, %teaser, %body.'),
       );
+      if (module_exists('token')) {
+        $form['token_help'] = array(
+        '#title' => t('Replacement patterns'),
+        '#type' => 'fieldset',
+        '#collapsible' => TRUE,
+        '#collapsed' => TRUE,
+        '#description' => t('Prefer raw-text replacements for text to avoid problems with HTML entities!'),
+        );
+        $form['token_help']['help'] = array(
+          '#value' => theme('token_help', 'node'),
+        );
+      }
       return $form;
 
     // validate the HTML form
