Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/socialnetwork/lib/item/ |
Upload File : |
<?php /** * Bitrix Framework * @package bitrix * @subpackage socialnetwork * @copyright 2001-2017 Bitrix */ namespace Bitrix\Socialnetwork\Item; use Bitrix\Main\Loader; use Bitrix\Socialnetwork\LogCommentTable; /** * Class for content view event handlers * * Class ContentViewHandler * @package Bitrix\Socialnetwork\Item */ final class ContentViewHandler { const CONTENT_TYPE_ID_COMMENT = 'LOG_COMMENT'; final static function getContentTypeIdList() { return array( self::CONTENT_TYPE_ID_COMMENT ); } /** * Handles content view event, marking IM notifications as read * * @param \Bitrix\Main\Event $event Event. * @return int|false */ public static function onContentViewed($viewParams) { $userId = intval($viewParams['userId']); $contentTypeId = $viewParams['typeId']; $contentEntityId = intval($viewParams['entityId']); if ( $userId <= 0 || !in_array($contentTypeId, self::getContentTypeIdList()) || $contentEntityId <= 0 || !Loader::includeModule('im') ) { return false; } $subTagList = array(); if ($contentTypeId == self::CONTENT_TYPE_ID_COMMENT) { } if (!empty($subTagList)) { $CIMNotify = new \CIMNotify(); $CIMNotify->markNotifyReadBySubTag($subTagList); } return true; } }