Index: bp-activity/bp-activity-notifications.php
===================================================================
--- bp-activity/bp-activity-notifications.php	(revision 7671)
+++ bp-activity/bp-activity-notifications.php	(working copy)
@@ -351,3 +351,14 @@
 add_action( 'bp_activity_screen_single_activity_permalink', 'bp_activity_remove_screen_notifications' );
 add_action( 'bp_activity_screen_mentions',                  'bp_activity_remove_screen_notifications' );
 
+
+function bp_activity_at_mention_delete_notification( $activity_ids_deleted = array() ) {
+	// Let's delete all without checking if content contains any mentions
+	// to avoid a query to get the activity
+	if ( bp_is_active( 'notifications' ) && !empty( $activity_ids_deleted ) ) {
+		foreach( $activity_ids_deleted as $activity_id ) {
+			bp_notifications_delete_all_notifications_by_type( $activity_id, buddypress()->activity->id );
+		}
+	}
+}
+add_action( 'bp_activity_deleted_activities', 'bp_activity_at_mention_delete_notification', 10, 1 );
Index: bp-groups/bp-groups-notifications.php
===================================================================
--- bp-groups/bp-groups-notifications.php	(revision 7671)
+++ bp-groups/bp-groups-notifications.php	(working copy)
@@ -554,6 +554,20 @@
 add_action( 'groups_delete_group', 'bp_groups_delete_group_delete_all_notifications', 10 );
 
 /**
+ * Remove promoted notifications for any demoted member
+ *
+ * @since BuddyPress (?)
+ */
+function bp_groups_delete_group_delete_promoted_notifications( $user_id = 0, $group_id = 0 ) {
+	if ( bp_is_active( 'notifications' ) && !empty( $group_id ) && !empty( $user_id ) ) { 
+		bp_notifications_delete_notifications_by_item_id( $user_id, $group_id, buddypress()->groups->id, 'member_promoted_to_admin' );
+		bp_notifications_delete_notifications_by_item_id( $user_id, $group_id, buddypress()->groups->id, 'member_promoted_to_mod' );
+	}
+}
+
+add_action( 'groups_demoted_member', 'bp_groups_delete_group_delete_promoted_notifications', 10, 2 );
+
+/**
  * Mark notifications read when a member accepts a group invitation
  *
  * @since BuddyPress (1.9.0)
Index: bp-messages/bp-messages-classes.php
===================================================================
--- bp-messages/bp-messages-classes.php	(revision 7671)
+++ bp-messages/bp-messages-classes.php	(working copy)
@@ -121,19 +121,26 @@
 
 		// Mark messages as deleted
 		$wpdb->query( $wpdb->prepare( "UPDATE {$bp->messages->table_name_recipients} SET is_deleted = 1 WHERE thread_id = %d AND user_id = %d", $thread_id, bp_loggedin_user_id() ) );
+		
+		// Get the massage id in order to delete notification
+		$message_id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->messages->table_name_messages} WHERE thread_id = %d", $thread_id ) );
 
 		// Check to see if any more recipients remain for this message
 		// if not, then delete the message from the database.
 		$recipients = $wpdb->get_results( $wpdb->prepare( "SELECT id FROM {$bp->messages->table_name_recipients} WHERE thread_id = %d AND is_deleted = 0", $thread_id ) );
 
 		if ( empty( $recipients ) ) {
+			
 			// Delete all the messages
 			$wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->messages->table_name_messages} WHERE thread_id = %d", $thread_id ) );
 
 			// Delete all the recipients
 			$wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->messages->table_name_recipients} WHERE thread_id = %d", $thread_id ) );
+
 		}
 
+		do_action_ref_array( 'messages_thread_deleted_thread', array( $message_id ) );
+
 		return true;
 	}
 
Index: bp-messages/bp-messages-notifications.php
===================================================================
--- bp-messages/bp-messages-notifications.php	(revision 7671)
+++ bp-messages/bp-messages-notifications.php	(working copy)
@@ -189,3 +189,13 @@
 	}
 }
 add_action( 'messages_screen_conversation', 'bp_messages_screen_inbox_mark_notifications', 10 );
+
+
+function bp_messages_message_delete_notification( $message_id = 0 ) {
+	if ( bp_is_active( 'notifications' ) && !empty( $message_id ) ) { 
+		bp_notifications_delete_notifications_by_item_id( bp_loggedin_user_id(), (int) $message_id, buddypress()->messages->id, 'new_message' );
+	}
+}
+
+add_action( 'messages_thread_deleted_thread', 'bp_messages_message_delete_notification', 10, 1 );
+
