• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message/Delete/DeleteService.php
  • Класс: BitrixImV2MessageDeleteDeleteService
  • Вызов: DeleteService::sendPullMessage
private function sendPullMessage(bool $completeDelete = false): Result
{
	$pullMessage = $this->getFormatPullMessage($completeDelete);

	if ($this->chat instanceof ChatPrivateChat)
	{
		$userId = $this->message->getAuthorId();
		$companionUserId = $this->chat->getCompanion($userId)->getId();
		$this->sendPullMessagePrivate($userId, $companionUserId, $pullMessage, $completeDelete);
		$this->sendPullMessagePrivate($companionUserId, $userId, $pullMessage, $completeDelete);
	}
	else
	{
		$groupedPullMessage = $this->groupPullByCounter($pullMessage, $completeDelete);
		foreach ($groupedPullMessage as $pullForGroup)
		{
			Event::add($pullForGroup['users'], $pullForGroup['event']);
		}

		if (in_array($this->chat->getType(), [Chat::IM_TYPE_OPEN, Chat::IM_TYPE_OPEN_LINE], true))
		{
			CPullWatch::AddToStack('IM_PUBLIC_' . $this->chat->getChatId(), $pullMessage);
		}
	}

	return new Result;
}