mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 18:38:15 +01:00
Use minimal replacement class for MessageModel
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
isAttachmentDownloadQueueEmpty,
|
||||
registerQueueEmptyCallback,
|
||||
} from '../util/attachmentDownloadQueue';
|
||||
import { MessageModel } from '../models/messages';
|
||||
|
||||
export type EditAttributesType = {
|
||||
conversationId: string;
|
||||
@@ -134,10 +135,8 @@ export async function onEdit(edit: EditAttributesType): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
const message = window.MessageCache.__DEPRECATED$register(
|
||||
targetMessage.id,
|
||||
targetMessage,
|
||||
'Edits.onEdit'
|
||||
const message = window.MessageCache.register(
|
||||
new MessageModel(targetMessage)
|
||||
);
|
||||
|
||||
await handleEditMessage(message.attributes, edit);
|
||||
|
||||
Reference in New Issue
Block a user