public function ConnectedHeartbeat::dressUpMessages in Heartbeat 6.4
Same name and namespace in other branches
- 6.3 includes/connectedheartbeat.inc \ConnectedHeartbeat::dressUpMessages()
Override dressupMessages to change the query.
Overrides HeartbeatAccess::dressUpMessages
See also
HeartbeatAccess::dressUpMessages().
File
- modules/
friendlist_activity/ connectedheartbeat.inc, line 31
Class
- ConnectedHeartbeat
- Class ConnectedHeartbeat Concrete class to prepare messages for the current user and all of his/her relations.
Code
public function dressUpMessages(HeartbeatParser $heartbeat) {
if (!empty($this->stream->heartbeat_relations)) {
// filter activity for related users and activity that was addressed to the current user.
$sql = " AND ((ua.uid in( %s ) AND ua.access >= 0) OR (ua.uid_target = %d AND ua.nid <> 0))";
$heartbeat->raw_messages = $this
->resultSql($sql, array(
implode(',', $this->stream->heartbeat_relations),
$this->stream->uid,
));
}
else {
$heartbeat->raw_messages = array();
}
return $heartbeat;
}