You are here

public function MembersActivity::dressUpMessages in Heartbeat 6.4

dressUpMessages

Parameters

HeartbeatParser $heartbeat: The parser for the messages in this stream.

Overrides HeartbeatAccess::dressUpMessages

File

modules/og_activity/membersactivity.inc, line 114

Class

MembersActivity
Class MembersActivity Concrete class to prepare messages for the current user and all of his/her relations.

Code

public function dressUpMessages(HeartbeatParser $heartbeat) {
  $members = array();
  $sql = og_list_users_sql(1, 0, NULL);
  $res = db_query($sql, $this->_gid);
  while ($row = db_fetch_object($res)) {
    $members[] = $row->uid;
  }
  if (!empty($members)) {
    $sql = " AND ua.uid IN (" . implode(',', $members) . ") ";
    $heartbeat->raw_messages = $this
      ->resultSql($sql);
  }
  else {
    $heartbeat->raw_messages = array();
  }
  return $heartbeat;
}