• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/controller/activity/todo.php
  • Класс: Bitrix\Crm\Controller\Activity\ToDo
  • Вызов: ToDo::tryNotifyWhenUpdate
private function tryNotifyWhenUpdate(int $activityId, int $ownerTypeId, int $ownerId, int $responsibleId, int $prevResponsibleId): void
{
	if ($responsibleId === $prevResponsibleId)
	{
		return;
	}

	$currentUserId = Container::getInstance()->getContext()->getUserId();

	$this->notifyViaIm(
		$activityId,
		$ownerTypeId,
		$ownerId,
		$prevResponsibleId,
		$currentUserId,
		self::NOTIFY_NO_LONGER_RESPONSIBLE
	);

	$this->notifyViaIm(
		$activityId,
		$ownerTypeId,
		$ownerId,
		$responsibleId,
		$currentUserId,
		self::NOTIFY_BECOME_RESPONSIBLE
	);
}