public function addSystem($userId, $message, $tag = '', $subTag = '', Attach $attachObject = null)
{
$arArgs = array('user_id' => (int) $userId, 'message' => (string) $message, 'tag' => (string) $tag, 'sub_tag' => (string) $subTag);
if (null === $userId) {
throw new Bitrix24Exception('user id is null');
} elseif (null === $message) {
throw new Bitrix24Exception('message is null');
} elseif (null !== $attachObject) {
$arArgs['attach'] = $attachObject->getData();
}
return $this->client->call('im.notify.system.add', $arArgs);
}