<?php
// This hook is called immediately after the query for messages has finished.
// The messages are in raw format and unfiltered. The access restrictions have not
// all completed the permission checking process so we can hook into this part to
// unset messages for instance.
// Since the count of the message items has not been set yet, it will still work nicely.
//Note that if you only want to alter messages to change their display, you should use
// hook_heartbeat_theme_alter().
/**
* Implementation of hook_heartbeat_messages_alter().
* @param $messages Array of raw heartbeat activity messages
* @param $stream HeartbeatAccess as the object that holds the current stream scope
*/
function heartbeat_example_heartbeat_messages_alter(&$messages, HeartbeatAccess $stream) {
// Loop through messages and unset $messages[$key] when you want to
// disable or block messages from being displayed.
}
?>