protected function getConversationMessageObject($messageRow, $reduced = false)
 {
     $message = new ConversationMessage();
     $message->id = $messageRow['id'];
     $message->uuid = $messageRow['uuid'];
     $message->date = $messageRow['date'];
     $message->senderId = $messageRow['sender_id'];
     $message->receiverId = $messageRow['receiver_id'];
     if (!$reduced) {
         $UserManager = Reg::get(ConfigManager::getConfig("Users", "Users")->Objects->UserManager);
         try {
             $message->sender = $UserManager->getUserById($messageRow['sender_id']);
             $message->receiver = $UserManager->getUserById($messageRow['receiver_id']);
         } catch (UserNotFoundException $e) {
         }
     }
     $message->message = $messageRow['message'];
     $message->read = $messageRow['read'];
     $message->deleted = $messageRow['deleted'];
     $message->hasAttachment = $messageRow['has_attachment'];
     $message->system = $messageRow["system"];
     if (!$reduced and $message->hasAttachment == '1') {
         $attachMgr = Reg::get(ConfigManager::getConfig("Messaging", "Conversations")->Objects->ConversationAttachmentManager);
         $filter = new ConversationAttachmentFilter();
         $filter->setMessageId($message->id);
         $message->attachments = $attachMgr->getAttachments($filter);
     }
     return $message;
 }
 protected function getConversationMessageObject($messageRow, $reduced = false)
 {
     $message = new ConversationMessage();
     $message->id = $messageRow['id'];
     $message->uuid = $messageRow['uuid'];
     $message->date = $messageRow['date'];
     $message->senderId = $messageRow['sender_id'];
     $message->receiverId = $messageRow['receiver_id'];
     if (!$reduced) {
         $userManagement = Reg::get(ConfigManager::getConfig("Users", "Users")->Objects->UserManagement);
         $message->sender = $userManagement->getObjectById($messageRow['sender_id']);
         $message->receiver = $userManagement->getObjectById($messageRow['receiver_id']);
     }
     $message->message = $messageRow['message'];
     $message->read = $messageRow['read'];
     $message->hasAttachment = $messageRow['has_attachment'];
     if (!$reduced and $message->hasAttachment == '1') {
         $attachMgr = Reg::get(ConfigManager::getConfig("Messaging", "Conversations")->Objects->ConversationAttachmentManager);
         $filter = new ConversationAttachmentFilter();
         $filter->setMessageId($message->id);
         $message->attachments = $attachMgr->getAttachments($filter);
     }
     return $message;
 }