You are here

function Messaging_Send_Method::message_prepare in Messaging 6.3

Same name and namespace in other branches
  1. 6.4 includes/messaging_method.class.inc \Messaging_Send_Method::message_prepare()
  2. 7 messaging.method.inc \Messaging_Send_Method::message_prepare()

Prepare message for processing with this method

File

classes/messaging_method.class.inc, line 114
Drupal Messaging Framework - Send_Method class file

Class

Messaging_Send_Method
Sending method, implements all specific method functionality

Code

function message_prepare($message) {

  // If the messaging method is of type push, cron processing will be enabled
  if ($message->queue && $this->type & MESSAGING_TYPE_PUSH) {
    $this->cron = 1;
  }

  // It will be queued always for pull methods, cron disabled though, so it will wait till it's pulled
  if (!$message->queue && $this->type & MESSAGING_TYPE_PULL) {
    $message->queue = 1;
    $message->cron = 0;
  }
}