Show sender and device number in decryption error toast
This commit is contained in:
parent
01549b11d1
commit
b1ebc0f483
6 changed files with 52 additions and 12 deletions
|
@ -151,13 +151,19 @@ export async function onRetryRequest(event: RetryRequestEvent): Promise<void> {
|
|||
log.info(`onRetryRequest/${logId}: Resend complete.`);
|
||||
}
|
||||
|
||||
function maybeShowDecryptionToast(logId: string) {
|
||||
function maybeShowDecryptionToast(
|
||||
logId: string,
|
||||
name: string,
|
||||
deviceId: number
|
||||
) {
|
||||
if (isProduction(window.getVersion())) {
|
||||
return;
|
||||
}
|
||||
|
||||
log.info(`maybeShowDecryptionToast/${logId}: Showing decryption error toast`);
|
||||
showToast(ToastDecryptionError, {
|
||||
deviceId,
|
||||
name,
|
||||
onShowDebugLog: () => window.showDebugLog(),
|
||||
});
|
||||
}
|
||||
|
@ -189,7 +195,8 @@ export async function onDecryptionError(
|
|||
await conversation.getProfiles();
|
||||
}
|
||||
|
||||
maybeShowDecryptionToast(logId);
|
||||
const name = conversation.getTitle();
|
||||
maybeShowDecryptionToast(logId, name, senderDevice);
|
||||
|
||||
if (
|
||||
conversation.get('capabilities')?.senderKey &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue