fix(messages): update DOM with server content after send — fixes visual glitch on optimistic messages
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
This commit is contained in:
parent
a52c52863e
commit
8c62571099
@ -1392,6 +1392,13 @@
|
|||||||
msgs[i].id = result.id;
|
msgs[i].id = result.id;
|
||||||
msgs[i]._optimistic = false;
|
msgs[i]._optimistic = false;
|
||||||
msgs[i].content = result.content;
|
msgs[i].content = result.content;
|
||||||
|
// Update DOM element with server-sanitized content
|
||||||
|
var domRow = document.querySelector('[data-message-id="' + tempId + '"]');
|
||||||
|
if (domRow) {
|
||||||
|
domRow.dataset.messageId = result.id;
|
||||||
|
var contentEl = domRow.querySelector('.message-content');
|
||||||
|
if (contentEl) contentEl.innerHTML = result.content || '';
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user