Remove references to some deprecated js-sdk identifiers (#12729)

* IKeyBackupInfo -> KeyBackupInfo

* ICryptoCallbacks -> CryptoCallbacks

* IRoomEncryption -> RoomEncryptionEventContent

* MEGOLM_ALGORITHM -> a single local constant

* UserTrustLevel -> UserVerificationStatus
This commit is contained in:
Richard van der Hoff 2024-07-04 16:50:07 +01:00 committed by GitHub
parent de12d69e6b
commit 489bc32674
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 61 additions and 43 deletions

View file

@ -20,6 +20,7 @@ import { Error as ErrorEvent } from "@matrix-org/analytics-events/types/typescri
import { DecryptionFailureCode } from "matrix-js-sdk/src/crypto-api";
import { PosthogAnalytics } from "./PosthogAnalytics";
import { MEGOLM_ENCRYPTION_ALGORITHM } from "./utils/crypto";
/** The key that we use to store the `reportedEvents` bloom filter in localstorage */
const DECRYPTION_FAILURE_STORAGE_KEY = "mx_decryption_failure_event_ids";
@ -207,7 +208,7 @@ export class DecryptionFailureTracker {
*/
private eventDecrypted(e: MatrixEvent, nowTs: number): void {
// for now we only track megolm decryption failures
if (e.getWireContent().algorithm != "m.megolm.v1.aes-sha2") {
if (e.getWireContent().algorithm != MEGOLM_ENCRYPTION_ALGORITHM) {
return;
}
const errCode = e.decryptionFailureReason;