function hook_heartbeat_messages_alter in Heartbeat 7
Hook to block messages that came from the query result.
This hook interacts at a point where heartbeat parser did not set the maximum number of messages yet. Try to avoid this hook as much as possible, as this hook should only be used to unset/remove activity messages from the stream.
Parameters
array $messages: Array of messages to alter by address.
HeartbeatStream $heartbeatStream: The heartbeat stream object.
File
- ./
heartbeat.api.php, line 223 - Hooks provided by the Heartbeat API.
Code
function hook_heartbeat_messages_alter(&$messages, HeartbeatStream $heartbeatStream) {
// Only use this to change access, add hardcoded messages on top of stream,
// deny messages, things like that ...
}