39 EventResult::UNDEFINED,
47 if (!in_array($eventId, self::getEventIdList()))
55 if (intval($sourceId) > 0)
58 $select = array(
'*',
'TOPIC.TITLE',
'UF_FORUM_MES_URL_PRV');
61 \
Bitrix\Main\
Config\Option::get(
'disk',
'successfully_converted',
false)
62 && \
Bitrix\Main\ModuleManager::isModuleInstalled(
'disk')
65 $select[] =
'UF_FORUM_MESSAGE_DOC';
68 $res = MessageTable::getList(array(
74 $message = $res->fetch();
79 $content .= LogIndex::getUserName($message[
"AUTHOR_ID"]).
" ";
80 $content .= $message[
'FORUM_MESSAGE_TOPIC_TITLE'].
" ";
81 $content .= \forumTextParser::clearAllTags($message[
'POST_MESSAGE']);
83 if (!empty($message[
'UF_FORUM_MESSAGE_DOC']))
85 $fileNameList = LogIndex::getDiskUFFileNameList($message[
'UF_FORUM_MESSAGE_DOC']);
86 if (!empty($fileNameList))
88 $content .=
' '.join(
' ', $fileNameList);
92 if (!empty($message[
'UF_FORUM_MES_URL_PRV']))
94 $metadata = \Bitrix\Main\UrlPreview\UrlMetadataTable::getRowById($message[
'UF_FORUM_MES_URL_PRV']);
97 && !empty($metadata[
'TITLE'])
100 $content .=
' '.$metadata[
'TITLE'];
106 EventResult::SUCCESS,
108 'content' => $content,