• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/classes/general/calendar_livefeed.php
  • Класс: CCalendarLiveFeed
  • Вызов: CCalendarLiveFeed::OnAfterSonetLogEntryAddComment
static function OnAfterSonetLogEntryAddComment($arSonetLogComment): void
{
	if ($arSonetLogComment["EVENT_ID"] !== "calendar_comment")
	{
		return;
	}

	$dbLog = CSocNetLog::GetList(
		[],
		array(
			"ID" => $arSonetLogComment["LOG_ID"],
			"EVENT_ID" => "calendar"
		),
		false,
		false,
		array("ID", "SOURCE_ID", "PARAMS")
	);

	if (
		($arLog = $dbLog->Fetch())
		&& ((int)$arLog["SOURCE_ID"] > 0)
	)
	{
		CCalendarNotify::NotifyComment(
			$arLog["SOURCE_ID"],
			array(
				"LOG" => $arLog,
				"LOG_ID" => $arLog["ID"],
				"USER_ID" => $arSonetLogComment["USER_ID"],
				"MESSAGE" => $arSonetLogComment["MESSAGE"],
				"URL" => $arSonetLogComment["URL"]
			)
		);
	}
}