2022-11-16 22:10:11 +00:00
|
|
|
// Copyright 2021-2022 Signal Messenger, LLC
|
2021-09-27 16:29:00 +00:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2022-11-16 22:10:11 +00:00
|
|
|
import { getMessageById } from '../messages/getMessageById';
|
|
|
|
|
2021-09-27 16:29:00 +00:00
|
|
|
export async function retryMessageSend(messageId: string): Promise<void> {
|
2022-11-16 22:10:11 +00:00
|
|
|
const message = await getMessageById(messageId);
|
2021-09-27 16:29:00 +00:00
|
|
|
if (!message) {
|
|
|
|
throw new Error(`retryMessageSend: Message ${messageId} missing!`);
|
|
|
|
}
|
|
|
|
await message.retrySend();
|
|
|
|
}
|