Due to: The access function _heartbeat_access_type_has_access has a account parameter. The access-check however does not use it (first instance of it).

In this way my cron run does not collect heartbeats properly. I use it in a notification messages.

Please fix it:

  if (user_access('view heartbeat messages')) {
    //...
  }

To

  if (user_access('view heartbeat messages', $account)) {
    //...
  }