fix: remove blocks when updating an old message (#5522)
* fix: remove blocks when updating an old message * minior tweak, add to threadMessagesToUpdate * remove the comments
This commit is contained in:
parent
39f8a92059
commit
cc7d0893e7
|
@ -136,6 +136,9 @@ export default async function updateMessages({
|
|||
try {
|
||||
return message.prepareUpdate(
|
||||
protectedFunction((m: TMessageModel) => {
|
||||
if (newMessage && !newMessage?.blocks) {
|
||||
newMessage.blocks = null;
|
||||
}
|
||||
Object.assign(m, newMessage);
|
||||
})
|
||||
);
|
||||
|
@ -160,6 +163,9 @@ export default async function updateMessages({
|
|||
try {
|
||||
return threadMessage.prepareUpdate(
|
||||
protectedFunction((tm: TThreadMessageModel) => {
|
||||
if (newThreadMessage && !newThreadMessage?.blocks) {
|
||||
newThreadMessage.blocks = null;
|
||||
}
|
||||
Object.assign(tm, newThreadMessage);
|
||||
if (threadMessage.tmid) {
|
||||
tm.rid = threadMessage.tmid;
|
||||
|
|
Loading…
Reference in New Issue