Index: activity.module
===================================================================
--- activity.module	(revision 2)
+++ activity.module	(working copy)
@@ -413,11 +413,7 @@
     $types = array_filter($context['activity_types']);
   }
   
-  if (!empty($types)) {
-    return module_invoke(activity_module_name($context['hook']), 'activity_type_check', $token_objects, $types);
-  }
-  
-  return TRUE;
+  return module_invoke(activity_module_name($context['hook']), 'activity_type_check', $token_objects, $types);
 }
 
 /**
Index: modules/user.activity.inc
===================================================================
--- modules/user.activity.inc	(revision 1)
+++ modules/user.activity.inc	(working copy)
@@ -10,11 +10,16 @@
  * Implementation of hook_activity_type_check().
  */
 function user_activity_type_check($token_objects, $types) {
-  // $types has the role id as values and $token_objects['account']->roles has
-  // the role id as keys. Need to get them to match up before checking for
-  // intersection.
-  $intersection = array_intersect(array_keys($token_objects['account']->roles), $types);
-  return !empty($intersection);
+  // There is no way of determining whether this is an insert or update from the token_objects so need to do another query
+  $insert_exists = db_result(db_query("SELECT COUNT(aid) FROM {activity} WHERE type = 'user' AND op = 'insert' AND uid = %d ORDER BY created DESC LIMIT 1", $token_objects['user']->uid));
+  
+  // Check to see if there is an activity delay for updating too soon after the user was first created
+  $updating_old = (time() - $token_objects['user']->created > variable_get('activity_user_first_update_delay', 0));
+  
+  // Check to see if there is an activity delay between updates
+  $update_delay = db_result(db_query("SELECT COUNT(aid) FROM {activity} WHERE type = 'user' AND op = 'update' AND uid = %d AND created > %d ORDER BY created DESC LIMIT 1", $token_objects['user']->uid, time() - variable_get('activity_user_delay_between_updates', 0)));
+  
+  return ($insert_exists == 0 || ($updating_old && $update_delay == 0));
 }
 
 /**
Index: modules/comment.activity.inc
===================================================================
--- modules/comment.activity.inc	(revision 1)
+++ modules/comment.activity.inc	(working copy)
@@ -39,7 +39,13 @@
  * Implementation of hook_activity_type_check().
  */
 function comment_activity_type_check($token_objects, $types) {
-  return (in_array($token_objects['node']->type, $types));
+  // Check to see if there is an activity delay for updating too soon after the comment was first created
+  $updating_old = (time() - $token_objects['comment']->timestamp > variable_get('activity_comment_first_update_delay', 0));
+  
+  // Check to see if there is an activity delay between updates
+  $update_delay = db_result(db_query("SELECT created FROM activity WHERE eid = %d AND op = 'update' AND uid = %d AND created > %d ORDER BY created DESC LIMIT 1", $token_objects['comment']->cid, $token_objects['user']->uid, time() - variable_get('activity_comment_delay_between_updates', 0)));
+  
+  return (in_array($token_objects['node']->type, $types) && ($token_objects['comment']->date == "now" || ($updating_old && $update_delay == 0)));
 }
 
 /**
Index: modules/node.activity.inc
===================================================================
--- modules/node.activity.inc	(revision 1)
+++ modules/node.activity.inc	(working copy)
@@ -10,7 +10,13 @@
  * Implementation of hook_activity_type_check().
  */
 function node_activity_type_check($token_objects, $types) {
-  return (in_array($token_objects['node']->type, $types));
+  // Check to see if there is an activity delay for updating too soon after the node was first created
+  $updating_old = ($token_objects['node']->changed - $token_objects['node']->created > variable_get('activity_node_first_update_delay', 0));
+  
+  // Check to see if there is an activity delay between updates
+  $update_delay = db_result(db_query("SELECT COUNT(aid) FROM {activity} WHERE nid = %d AND op = 'update' AND uid = %d AND created > %d ORDER BY created DESC LIMIT 1", $token_objects['node']->nid, $token_objects['user']->uid, $token_objects['node']->changed - variable_get('activity_node_delay_between_updates', 0)));
+  
+  return (in_array($token_objects['node']->type, $types) && ($token_objects['node']->is_new || ($updating_old && $update_delay == 0)));
 }
 
 /**
Index: activity.admin.inc
===================================================================
--- activity.admin.inc	(revision 1)
+++ activity.admin.inc	(working copy)
@@ -495,6 +495,75 @@
     '#default_value' => variable_get('activity_min_count', 0),
   );
   
+  
+  $form['activity_delays'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Activity Delays'),
+  );
+  
+  $form['activity_delays']['node'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Node Delays'),
+  );
+  
+  $form['activity_delays']['node']['activity_node_first_update_delay'] = array(
+    '#type' => 'select',
+    '#title' => t('Delay after node creation'),
+    '#description' => t('This is the amount of time Activity should wait before recording updates for a node after it has been created.'),
+    '#options' => drupal_map_assoc(array(0, 60, 1800, 3600, 7200, 14400, 21600, 43200, 86400, 604800), 'format_interval'),
+    '#default_value' => variable_get('activity_node_first_update_delay', 0),
+  );
+  
+  $form['activity_delays']['node']['activity_node_delay_between_updates'] = array(
+    '#type' => 'select',
+    '#title' => t('Delay between node updates'),
+    '#description' => t('This is the amount of time Activity should wait between node updates before recording another one.'),
+    '#options' => drupal_map_assoc(array(0, 30, 60, 300, 600, 900, 1800, 3600, 7200), 'format_interval'),
+    '#default_value' => variable_get('activity_node_delay_between_updates', 0),
+  );
+  
+  $form['activity_delays']['comment'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Comment Delays'),
+  );
+  
+  $form['activity_delays']['comment']['activity_comment_first_update_delay'] = array(
+    '#type' => 'select',
+    '#title' => t('Delay after comment creation'),
+    '#description' => t('This is the amount of time Activity should wait before recording updates for a comment after it has been created.'),
+    '#options' => drupal_map_assoc(array(0, 60, 1800, 3600, 7200, 14400, 21600, 43200, 86400, 604800), 'format_interval'),
+    '#default_value' => variable_get('activity_comment_first_update_delay', 0),
+  );
+  
+  $form['activity_delays']['comment']['activity_comment_delay_between_updates'] = array(
+    '#type' => 'select',
+    '#title' => t('Delay between comment updates'),
+    '#description' => t('This is the amount of time Activity should wait between comment updates before recording another one.'),
+    '#options' => drupal_map_assoc(array(0, 30, 60, 300, 600, 900, 1800, 3600, 7200), 'format_interval'),
+    '#default_value' => variable_get('activity_comment_delay_between_updates', 0),
+  );
+  
+  $form['activity_delays']['user'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('User Delays'),
+  );
+  
+  $form['activity_delays']['user']['activity_user_first_update_delay'] = array(
+    '#type' => 'select',
+    '#title' => t('Delay after user creation'),
+    '#description' => t('This is the amount of time Activity should wait before recording updates to a user\'s account after it has been created.'),
+    '#options' => drupal_map_assoc(array(0, 60, 1800, 3600, 7200, 14400, 21600, 43200, 86400, 604800), 'format_interval'),
+    '#default_value' => variable_get('activity_user_first_update_delay', 0),
+  );
+  
+  $form['activity_delays']['user']['activity_user_delay_between_updates'] = array(
+    '#type' => 'select',
+    '#title' => t('Delay between user updates'),
+    '#description' => t('This is the amount of time Activity should wait between user account updates before recording another one.'),
+    '#options' => drupal_map_assoc(array(0, 30, 60, 300, 600, 900, 1800, 3600, 7200), 'format_interval'),
+    '#default_value' => variable_get('activity_user_delay_between_updates', 0),
+  );
+  
 
   // get all the  modules and their realms
   $api_info = activity_get_module_info();
