Replace MessageController with MessageCache

This commit is contained in:
Josh Perez 2023-10-03 20:12:57 -04:00 committed by GitHub
parent ba1a8aad09
commit 7d35216fda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 2237 additions and 1229 deletions

View file

@ -311,7 +311,11 @@ export async function sendStoryMessage(
await Promise.all(
distributionListMessages.map(messageAttributes => {
const model = new window.Whisper.Message(messageAttributes);
const message = window.MessageController.register(model.id, model);
const message = window.MessageCache.__DEPRECATED$register(
model.id,
model,
'sendStoryMessage'
);
void ourConversation.addSingleMessage(model, { isJustSent: true });
@ -361,7 +365,11 @@ export async function sendStoryMessage(
},
async jobToInsert => {
const model = new window.Whisper.Message(messageAttributes);
const message = window.MessageController.register(model.id, model);
const message = window.MessageCache.__DEPRECATED$register(
model.id,
model,
'sendStoryMessage'
);
const conversation = message.getConversation();
void conversation?.addSingleMessage(model, { isJustSent: true });