Skip to content

Commit

Permalink
feat(event): deprecate parameter and functions using legacy crypto (#…
Browse files Browse the repository at this point in the history
…4697) (#4700)

(cherry picked from commit 6b93e11)

Co-authored-by: Florian D <florianduros@element.io>
  • Loading branch information
RiotRobot and florianduros authored Feb 6, 2025
1 parent 6b0d2a4 commit 6d7699c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/models/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,12 @@ export class MatrixEvent extends TypedEventEmitter<MatrixEventEmittedEvents, Mat
*/
public forwardLooking = true;

/* If the event is a `m.key.verification.request` (or to_device `m.key.verification.start`) event,
/**
* If the event is a `m.key.verification.request` (or to_device `m.key.verification.start`) event,
* `Crypto` will set this the `VerificationRequest` for the event
* so it can be easily accessed from the timeline.
*
* @deprecated Not used by the rust crypto implementation.
*/
public verificationRequest?: VerificationRequest;

Expand Down Expand Up @@ -896,6 +899,8 @@ export class MatrixEvent extends TypedEventEmitter<MatrixEventEmittedEvents, Mat
* @param userId - the user who received this event
*
* @returns a promise that resolves when the request is queued
*
* @deprecated Not used by the rust crypto implementation.
*/
public cancelAndResendKeyRequest(crypto: Crypto, userId: string): Promise<void> {
const wireContent = this.getWireContent();
Expand Down Expand Up @@ -1720,6 +1725,9 @@ export class MatrixEvent extends TypedEventEmitter<MatrixEventEmittedEvents, Mat
};
}

/**
* @deprecated Not used by the rust crypto implementation.
*/
public setVerificationRequest(request: VerificationRequest): void {
this.verificationRequest = request;
}
Expand Down

0 comments on commit 6d7699c

Please sign in to comment.