You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-19 16:42:09 +03:00
Add getPrevContent function and mark it's situational presence.
This commit is contained in:
@@ -91,6 +91,15 @@ module.exports.MatrixEvent.prototype = {
|
|||||||
return this.event.content || {};
|
return this.event.content || {};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the previous event content JSON. This will only return something for
|
||||||
|
* state events which exist in the timeline.
|
||||||
|
* @return {Object} The previous event content JSON, or an empty object.
|
||||||
|
*/
|
||||||
|
getPrevContent: function() {
|
||||||
|
return this.event.prev_content || {};
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the age of this event. This represents the age of the event when the
|
* Get the age of this event. This represents the age of the event when the
|
||||||
* event arrived at the device, and not the age of the event when this
|
* event arrived at the device, and not the age of the event when this
|
||||||
|
Reference in New Issue
Block a user