mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-20 00:18:45 +01:00
Extra toast for Message Receiver errors
This commit is contained in:
committed by
Josh Perez
parent
36b3e2de08
commit
ca4aad6bad
@@ -29,6 +29,7 @@ import type { ConversationModel } from '../models/conversations';
|
||||
import type {
|
||||
DecryptionErrorEvent,
|
||||
DecryptionErrorEventData,
|
||||
InvalidPlaintextEvent,
|
||||
RetryRequestEvent,
|
||||
RetryRequestEventData,
|
||||
} from '../textsecure/messageReceiverEvents';
|
||||
@@ -205,6 +206,23 @@ function maybeShowDecryptionToast(
|
||||
});
|
||||
}
|
||||
|
||||
export function onInvalidPlaintextMessage({
|
||||
data,
|
||||
}: InvalidPlaintextEvent): void {
|
||||
const { senderUuid, senderDevice, timestamp } = data;
|
||||
const logId = `${senderUuid}.${senderDevice} ${timestamp}`;
|
||||
|
||||
log.info(`onInvalidPlaintextMessage/${logId}: Starting...`);
|
||||
|
||||
const conversation = window.ConversationController.getOrCreate(
|
||||
senderUuid,
|
||||
'private'
|
||||
);
|
||||
|
||||
const name = conversation.getTitle();
|
||||
maybeShowDecryptionToast(logId, name, senderDevice);
|
||||
}
|
||||
|
||||
export async function onDecryptionError(
|
||||
event: DecryptionErrorEvent
|
||||
): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user