Синхронизация с API: support_api_base из конфига, заголовки при создании тикета, убран неиспользуемый poll

This commit is contained in:
root
2026-05-14 10:35:36 +00:00
parent 306bcc8f51
commit c92eccfc41
4 changed files with 13 additions and 7 deletions
+6 -3
View File
@@ -260,7 +260,7 @@
const node = messageList.querySelector(`[data-f7-msg-id="${id}"]`);
if (node) hydrateClientAttachments(node);
messageList.scrollTop = messageList.scrollHeight;
if (msg.author_role === "support" && state.currentTicket) {
if (clientReadReceiptsEnabled && msg.author_role === "support" && state.currentTicket) {
markClientTicketRead(state.currentTicket).catch(() => {});
}
}
@@ -775,7 +775,7 @@
"X-F7cloud-Server": serverAddress,
},
});
if (!response.ok) throw new Error("Не удалось получить токены");
if (!response.ok) throw new Error("Не удалось загрузить список обращений");
state.tickets = await response.json();
renderTickets();
}
@@ -956,7 +956,10 @@
try {
const response = await fetch(`${apiBase}/api/client/tickets`, {
method: "POST",
headers: { "Content-Type": "application/json" },
headers: {
"Content-Type": "application/json",
...clientIdentityHeaders(),
},
body: JSON.stringify({ ...payload, duplicate }),
signal: controller.signal,
});