You are here

function commons_follow_get_followed_message_ids in Drupal Commons 7.3

Find a list of message IDs that correspond to events that the current user is following.

1 call to commons_follow_get_followed_message_ids()
commons_follow_plugin_argument_default_message::get_argument in modules/commons/commons_follow/includes/views/handlers/commons_follow_plugin_argument_default_message.inc
Get the default argument.

File

modules/commons/commons_follow/commons_follow.module, line 324

Code

function commons_follow_get_followed_message_ids($account = NULL) {
  $followed_mids = array();

  // Allow the module with this flag namespace to return a list of
  // followed MIDs.
  $followed_content = commons_follow_get_followed_content($account);
  $followed_mids = array();
  foreach ($followed_content as $key => $content) {
    $function = $key . '_commons_follow_get_message_ids';
    if (function_exists($function)) {
      $function($followed_mids, $followed_content);
    }
  }
  return $followed_mids;
}