1
0
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:
Kegan Dougal
2015-06-12 11:26:33 +01:00
parent 71dacb14b1
commit 3061b95afe

View File

@@ -91,6 +91,15 @@ module.exports.MatrixEvent.prototype = {
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
* event arrived at the device, and not the age of the event when this