49 EventResult::UNDEFINED,
57 if (!in_array($eventId, self::getEventIdList()))
65 if ((
int)$sourceId > 0)
67 $select = array(
'*',
'UF_FORUM_MES_URL_PRV',
'SERVICE_TYPE');
70 \
Bitrix\Main\
Config\Option::get(
'disk',
'successfully_converted',
false)
71 && \
Bitrix\Main\ModuleManager::isModuleInstalled(
'disk')
74 $select[] =
'UF_FORUM_MESSAGE_DOC';
77 $res = MessageTable::getList(array(
83 $message = $res->fetch();
88 if (!empty($message[
'SERVICE_TYPE']))
93 $content .= LogIndex::getUserName($message[
"AUTHOR_ID"]).
" ";
94 $content .= \forumTextParser::clearAllTags($message[
'POST_MESSAGE']);
96 if (!empty($message[
'UF_FORUM_MESSAGE_DOC']))
98 $fileNameList = LogIndex::getDiskUFFileNameList($message[
'UF_FORUM_MESSAGE_DOC']);
99 if (!empty($fileNameList))
101 $content .=
' '.implode(
' ', $fileNameList);
105 if (!empty($message[
'UF_FORUM_MES_URL_PRV']))
107 $metadata = \Bitrix\Main\UrlPreview\UrlMetadataTable::getRowById($message[
'UF_FORUM_MES_URL_PRV']);
110 && !empty($metadata[
'TITLE'])
113 $content .=
' '.$metadata[
'TITLE'];
119 EventResult::SUCCESS,
121 'content' => $content,