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

This commit is contained in:
G30 2026-10-13 08:47:05 -04:00 • committed by GitHub
parent 1c5f101d0b
commit 2d56514101
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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}`);