Синхронизация с API: support_api_base из конфига, заголовки при создании тикета, убран неиспользуемый poll
This commit is contained in:
+6
-3
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user