You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
Return a properly shaped event
This commit is contained in:
@@ -268,7 +268,8 @@ export class MatrixEvent extends EventEmitter {
|
||||
* @returns {Partial<IEvent>} The clear event, as known by the SDK.
|
||||
*/
|
||||
public getClearEvent(): Partial<IEvent> {
|
||||
return this.clearEvent ?? this.event;
|
||||
// clearEvent doesn't have all the fields, so we'll copy what we can from this.event
|
||||
return Object.assign({}, this.event, this.clearEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user