fix(api): missing archived messages etc in exports

This commit is contained in:
Isaac 2025-02-01 03:14:32 +00:00
parent a33c670fc8
commit 9689648a6c
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -13,18 +13,18 @@ expose({
if (ticket.feedback?.comment) ticket.feedback.comment = decrypt(ticket.feedback.comment); if (ticket.feedback?.comment) ticket.feedback.comment = decrypt(ticket.feedback.comment);
if (ticket.topic) ticket.topic = decrypt(ticket.topic); if (ticket.topic) ticket.topic = decrypt(ticket.topic);
ticket.archivedMessages = ticket.archivedMessages.map(async message => { ticket.archivedMessages = ticket.archivedMessages.map(message => {
message.content = decryptIfExists(message.content); message.content = decryptIfExists(message.content);
return message; return message;
}); });
ticket.archivedUsers = ticket.archivedUsers.map(async user => { ticket.archivedUsers = ticket.archivedUsers.map(user => {
user.displayName = decryptIfExists(user.displayName); user.displayName = decryptIfExists(user.displayName);
user.username = decryptIfExists(user.username); user.username = decryptIfExists(user.username);
return user; return user;
}); });
ticket.questionAnswers = ticket.questionAnswers.map(async answer => { ticket.questionAnswers = ticket.questionAnswers.map(answer => {
if (answer.value) answer.value = decryptIfExists(answer.value); if (answer.value) answer.value = decryptIfExists(answer.value);
return answer; return answer;
}); });