<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
class Messages_View_Helper_GetMessageBody extends Zend_View_Helper_Abstract
{
  public function getMessageBody($message)
  {
    if (empty($message->body)) {
      return '';
    }

    $bbcode = Zend_Markup::factory('Bbcode');
    return $this->view->getHelper('getActionContent')->smileyToEmoticons(
      html_entity_decode(htmlspecialchars_decode(Engine_Text_Emoji::decode($message->body)))
    );
  }
}
