Опрос тикетов по умолчанию каждые 3 с; пустой конфиг не отключает опрос
This commit is contained in:
@@ -51,8 +51,12 @@ class PageController extends Controller {
|
||||
$clientReadReceipts = $this->config->getAppValue('f7support', 'client_read_receipts', '0');
|
||||
|
||||
// Периодический GET /api/client/tickets (мс): has_unread и отпечаток карточки; WebSocket только у открытого тикета.
|
||||
// 0 — отключить опрос. Иначе значение ограничивается 3000…120000. occ: f7support tickets_poll_ms
|
||||
$ticketsPollMs = (int) $this->config->getAppValue('f7support', 'tickets_poll_ms', '3000');
|
||||
// По умолчанию 3000 (3 с). Пустая строка в конфиге трактуется как 3000. Явное «0» отключает опрос. Иначе 3000…120000. occ: f7support tickets_poll_ms
|
||||
$rawPoll = trim((string) $this->config->getAppValue('f7support', 'tickets_poll_ms', '3000'));
|
||||
if ($rawPoll === '') {
|
||||
$rawPoll = '3000';
|
||||
}
|
||||
$ticketsPollMs = (int) $rawPoll;
|
||||
if ($ticketsPollMs < 0) {
|
||||
$ticketsPollMs = 0;
|
||||
} elseif ($ticketsPollMs > 0) {
|
||||
|
||||
Reference in New Issue
Block a user