Skip to content

Commit 30cc87d

Browse files
committed
Small fixes
1 parent 94f6a35 commit 30cc87d

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

lib/Bitrix/BitrixSmsSender.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public static function getInstance(TexterInterface $notifier): self
5858
/**
5959
* Отправить сообщение.
6060
*
61-
* @param string $codeEvent Код события.
62-
* @param array $arFields Параметры события.
61+
* @param string $codeEvent Код события.
62+
* @param array $arFields Параметры события.
6363
*
6464
* @return void
6565
* @throws ArgumentException | ObjectPropertyException | SystemException Битриксовые ошибки.
@@ -107,4 +107,4 @@ public function send(string $codeEvent, array $arFields): void
107107
// Silence. Не самый важный момент.
108108
}
109109
}
110-
}
110+
}

lib/Bitrix/EventBridge.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public function getMessageTemplate(string $codeEvent, array $sites = []) : array
6262
$messageDb = EventMessageTable::getList([
6363
'select' => ['ID'],
6464
'filter' => [
65+
'=ACTIVE' => 'Y',
6566
'=EVENT_NAME' => $codeEvent,
6667
'=EVENT_MESSAGE_SITE.SITE_ID' => $arSites,
6768
],

readme.MD

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ return [
146146
'mailer' => [
147147
'enabled' => true,
148148
'dsn' => 'gmail+smtp://robotivanov2020:izjqfjyegwmznrtb@default',
149-
'dsn_file' => 'file:///upload/emails/{Y}/{m}/{d}/@hash.eml',
150149
'envelope' => [
151150
'recipients' => ['testing@mail.ru'],
152151
// Поле from отправляемого письма
@@ -202,13 +201,8 @@ return [
202201

203202
// Будет оправлено сообщение в канал email и сделана запись в таблице b_event.
204203
$bitrixEventHandler->send('CODE_MAIL_EVENT', $arFields);
205-
206-
// Будет оправлено сообщение в канал согласно логике channel_policy
207-
$bitrixEventHandler->send('CODE_MAIL_EVENT', $arFields, Notification::IMPORTANCE_MEDIUM);
208204
```
209205

210-
Ограничение: механизм отправляет все письма, как html, игнорируя настройки битриксового почтового шаблона.
211-
212206
Ошибки отправки не глушатся. Если что-то пойдет не так, то выбросится исключение.
213207

214208
### Использование битриксовых SMS событий и их шаблонов

0 commit comments

Comments
 (0)