• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message/CounterService.php
  • Класс: BitrixImV2MessageCounterService
  • Вызов: CounterService::deleteAll
public function deleteAll(bool $withNotify = false): void
{
	$filter = ['=USER_ID' => $this->getContext()->getUserId()];

	if (!$withNotify)
	{
		$filter['!=CHAT_TYPE'] = IM_MESSAGE_SYSTEM; // todo: add index
	}

	MessageUnreadTable::deleteByFilter($filter);
	static::clearCache($this->getContext()->getUserId());
}