You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
Improve decryption failure logging (#2453)
* Improve typing * Log the actual errors to include call stacks
This commit is contained in:
committed by
GitHub
parent
aaf508e309
commit
4897bccdc9
@@ -30,7 +30,7 @@ import {
|
||||
registerAlgorithm,
|
||||
UnknownDeviceError,
|
||||
} from "./base";
|
||||
import { WITHHELD_MESSAGES } from '../OlmDevice';
|
||||
import { IDecryptedGroupMessage, WITHHELD_MESSAGES } from '../OlmDevice';
|
||||
import { Room } from '../../models/room';
|
||||
import { DeviceInfo } from "../deviceinfo";
|
||||
import { IOlmSessionResult } from "../olmlib";
|
||||
@@ -1280,7 +1280,7 @@ class MegolmDecryption extends DecryptionAlgorithm {
|
||||
// (fixes https://github.com/vector-im/element-web/issues/5001)
|
||||
this.addEventToPendingList(event);
|
||||
|
||||
let res;
|
||||
let res: IDecryptedGroupMessage;
|
||||
try {
|
||||
res = await this.olmDevice.decryptGroupMessage(
|
||||
event.getRoomId(), content.sender_key, content.session_id, content.ciphertext,
|
||||
|
||||
@@ -32,6 +32,7 @@ import {
|
||||
import { Room } from '../../models/room';
|
||||
import { MatrixEvent } from "../..";
|
||||
import { IEventDecryptionResult } from "../index";
|
||||
import { IInboundSession } from "../OlmDevice";
|
||||
|
||||
const DeviceVerification = DeviceInfo.DeviceVerification;
|
||||
|
||||
@@ -331,7 +332,7 @@ class OlmDecryption extends DecryptionAlgorithm {
|
||||
// prekey message which doesn't match any existing sessions: make a new
|
||||
// session.
|
||||
|
||||
let res;
|
||||
let res: IInboundSession;
|
||||
try {
|
||||
res = await this.olmDevice.createInboundSession(
|
||||
theirDeviceIdentityKey, message.type, message.body,
|
||||
|
||||
Reference in New Issue
Block a user