Передавать email пользователя F7cloud в API поддержки.
Email из Nextcloud (getEMailAddress) уходит в data-user-email, заголовок X-F7cloud-Email и поле client_email при создании тикета — для привязки контакта CRM в Bitrix24.
This commit is contained in:
+12
-3
@@ -3,6 +3,7 @@
|
||||
if (!root) return;
|
||||
|
||||
const username = root.dataset.username;
|
||||
const userEmail = (root.dataset.userEmail || "").trim();
|
||||
const serverAddress = root.dataset.serverAddress;
|
||||
const apiBase = root.dataset.supportApiBase;
|
||||
const supportWsBaseOverride = (root.dataset.supportWsBase || "").trim();
|
||||
@@ -281,10 +282,14 @@
|
||||
};
|
||||
|
||||
function clientIdentityHeaders() {
|
||||
return {
|
||||
const headers = {
|
||||
"X-F7cloud-User": username,
|
||||
"X-F7cloud-Server": serverAddress,
|
||||
};
|
||||
if (userEmail) {
|
||||
headers["X-F7cloud-Email"] = userEmail;
|
||||
}
|
||||
return headers;
|
||||
}
|
||||
|
||||
function revokeAttachmentUrls() {
|
||||
@@ -1471,12 +1476,16 @@
|
||||
showError("Тема и обращение обязательны");
|
||||
return;
|
||||
}
|
||||
const result = await submitTicketWithRetry({
|
||||
const createPayload = {
|
||||
server_address: serverAddress,
|
||||
username,
|
||||
subject,
|
||||
body: TICKET_CREATE_BODY_PLACEHOLDER,
|
||||
});
|
||||
};
|
||||
if (userEmail) {
|
||||
createPayload.client_email = userEmail;
|
||||
}
|
||||
const result = await submitTicketWithRetry(createPayload);
|
||||
const ticketNo = result.ticket_number;
|
||||
let createdMsg;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user