You are here

function messaging_xmpp_user_offline_options in Messaging 6.4

Same name and namespace in other branches
  1. 6.2 messaging_xmpp/messaging_xmpp.module \messaging_xmpp_user_offline_options()
  2. 6.3 messaging_xmpp/messaging_xmpp.module \messaging_xmpp_user_offline_options()

Options when user is off line

2 calls to messaging_xmpp_user_offline_options()
messaging_xmpp_settings_form in messaging_xmpp/messaging_xmpp.module
Site wide settings form
messaging_xmpp_user in messaging_xmpp/messaging_xmpp.module
Implementation of hook_user()

File

messaging_xmpp/messaging_xmpp.module, line 17
XMPP Messsaging. Messaging method plug-in

Code

function messaging_xmpp_user_offline_options($account = NULL) {

  // General options, for admin settings too
  $options = array(
    MESSAGING_XMPP_OFFLINE_SEND => t('Send anyway, you may get the messages when online.'),
    //MESSAGING_XMPP_OFFLINE_QUEUE => t('Queue and send when user comes back online.'),
    MESSAGING_XMPP_OFFLINE_DISCARD => t('Discard, the message will be lost.'),
  );

  // Alternate methods, will depend on user account
  if ($account) {
    $methods = messaging_method_list($account);
    unset($methods['xmpp']);
    if ($methods) {
      $options[t('Send using...')] = $methods;
    }
  }
  return $options;
}