You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Expose MatrixEvent's internal clearEvent as a function
This commit is contained in:
@@ -262,6 +262,15 @@ export class MatrixEvent extends EventEmitter {
|
|||||||
this.localTimestamp = Date.now() - this.getAge();
|
this.localTimestamp = Date.now() - this.getAge();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the clear event as it would be received over the wire. If the event
|
||||||
|
* is not encrypted, this simply returns the event as-is.
|
||||||
|
* @returns {Partial<IEvent>} The clear event, as known by the SDK.
|
||||||
|
*/
|
||||||
|
public getClearEvent(): Partial<IEvent> {
|
||||||
|
return this.clearEvent ?? this.event;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the event_id for this event.
|
* Get the event_id for this event.
|
||||||
* @return {string} The event ID, e.g. <code>$143350589368169JsLZx:localhost
|
* @return {string} The event ID, e.g. <code>$143350589368169JsLZx:localhost
|
||||||
|
|||||||
Reference in New Issue
Block a user