I need a hook allowing me to execute custom logic when messages are being fetched from the server.

Comments

jeremy’s picture

Status: Active » Fixed
jeremy’s picture

To document, the new hook is support_fetch_message_alter.

A silly example use case, in a module named 'sample':

sample_support_fetch_message_alter(&$message, $client) {
  if ($message['from'] == 'nobody@nowhere.net') {
    $message['body'] .= "\nThis text was appended to the message body.\n"
  }
}

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.