26 if (is_null($this->topic))
33 $rows = \Bitrix\Forum\MessageTable::query()
35 ->where(
'FORUM_ID', $forumId)
36 ->where(
'TOPIC_ID', $this->topic[
'ID']);
38 $comments =
$rows->fetchAll();
44 $newFeed = new \Bitrix\Forum\Comments\Feed($forumId, [
47 'xml_id' => $newEntityXmlId,
50 if (!$newFeed->checkTopic())
55 $newTopicId = $newFeed->getTopic()[
'ID'];
56 $commentsIds = array_map(
'intval', array_column($comments,
'ID'));
57 \Bitrix\Forum\MessageTable::updateMulti($commentsIds, [
58 'TOPIC_ID' => $newTopicId,