fix: a rating's reason and comment are no longer wiped when its tags arrive

This commit is contained in:
silentoplayz 2026-10-12 22:53:01 -04:00
parent 93d25dbe3b
commit 2f9add8dde

View file

@ -569,13 +569,16 @@
console.log(tags);
if (tags) {
updatedMessage.annotation.tags = tags;
feedbackItem.data.tags = tags;
const taggedMessage = {
...message,
annotation: { ...(message?.annotation ?? {}), tags: tags }
};
feedbackItem.data = { ...feedbackItem.data, ...taggedMessage.annotation };
saveMessage(message.id, updatedMessage);
saveMessage(message.id, taggedMessage);
await updateFeedbackById(
localStorage.token,
updatedMessage.feedbackId,
taggedMessage.feedbackId,
feedbackItem
).catch((error) => {
toast.error(`${error}`);