1
0
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:
Travis Ralston
2021-07-14 10:07:43 -06:00
parent 83337eee57
commit 326b14402f

View File

@@ -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);
}
/**