From aeade9ce587086c86c8ef67e9040a2fea274fecd Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Tue, 6 Jan 2026 11:23:13 +0000 Subject: [PATCH] Remove unused property `MatrixEvent.untrusted` (#5118) * Remove unused property MatrixEvent.untrusted This was never set to anything other than `false`. I think it is a hangover from pre-rust-sdk. * Remove call to redundant `isKeySourceUntrusted` `isKeySourceUntrusted` always returns false so no point calling it * Remove dangling assignments to MatrixEvent.untrusted --- src/common-crypto/CryptoBackend.ts | 5 ----- src/models/event.ts | 19 +++++-------------- src/testing.ts | 1 - 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/common-crypto/CryptoBackend.ts b/src/common-crypto/CryptoBackend.ts index f13777fb9..5758858ad 100644 --- a/src/common-crypto/CryptoBackend.ts +++ b/src/common-crypto/CryptoBackend.ts @@ -213,11 +213,6 @@ export interface EventDecryptionResult { * ed25519 key claimed by the sender of this event. See {@link MatrixEvent#getClaimedEd25519Key}. */ claimedEd25519Key?: string; - /** - * Whether the keys for this event have been received via an unauthenticated source (eg via key forwards, or - * restored from backup) - */ - untrusted?: boolean; } /** diff --git a/src/models/event.ts b/src/models/event.ts index ec6672c6f..abdda8412 100644 --- a/src/models/event.ts +++ b/src/models/event.ts @@ -185,8 +185,7 @@ export interface IDecryptOptions { isRetry?: boolean; /** - * Whether the message should be re-decrypted if it was previously successfully decrypted with an untrusted key. - * Defaults to `false`. + * @deprecated does nothing */ forceRedecryptIfUntrusted?: boolean; } @@ -284,10 +283,6 @@ export class MatrixEvent extends TypedEventEmitter