mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-25 04:36:46 +00:00
Use minimal replacement class for MessageModel
This commit is contained in:
@@ -24,7 +24,7 @@ import {
|
||||
import { concat, filter, map, repeat, zipObject, find } from './iterables';
|
||||
import { getConversationIdForLogging } from './idForLogging';
|
||||
import { isQuoteAMatch } from '../messages/helpers';
|
||||
import { __DEPRECATED$getMessageById } from '../messages/getMessageById';
|
||||
import { getMessageById } from '../messages/getMessageById';
|
||||
import { handleEditMessage } from './handleEditMessage';
|
||||
import { incrementMessageCounter } from './incrementMessageCounter';
|
||||
import { isGroupV1 } from './whatTypeOfConversation';
|
||||
@@ -34,6 +34,7 @@ import { strictAssert } from './assert';
|
||||
import { timeAndLogIfTooLong } from './timeAndLogIfTooLong';
|
||||
import { makeQuote } from './makeQuote';
|
||||
import { getMessageSentTimestamp } from './getMessageSentTimestamp';
|
||||
import { postSaveUpdates } from './cleanup';
|
||||
|
||||
const SEND_REPORT_THRESHOLD_MS = 25;
|
||||
|
||||
@@ -65,10 +66,7 @@ export async function sendEditedMessage(
|
||||
conversation.attributes
|
||||
)})`;
|
||||
|
||||
const targetMessage = await __DEPRECATED$getMessageById(
|
||||
targetMessageId,
|
||||
'sendEditedMessage'
|
||||
);
|
||||
const targetMessage = await getMessageById(targetMessageId);
|
||||
strictAssert(targetMessage, 'could not find message to edit');
|
||||
|
||||
if (isGroupV1(conversation.attributes)) {
|
||||
@@ -229,6 +227,7 @@ export async function sendEditedMessage(
|
||||
await DataWriter.saveMessage(targetMessage.attributes, {
|
||||
jobToInsert,
|
||||
ourAci: window.textsecure.storage.user.getCheckedAci(),
|
||||
postSaveUpdates,
|
||||
});
|
||||
}
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user