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

This commit is contained in:
G30 authored and GitHub committed 2026-10-13 16:47:05 +04:00
1 parent 1c5f101d0b
commit 2d56514101
1 file changed
+7 -4
@@ -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}`);