1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Return v2 prev_content when calling getPrevContent()

This commit is contained in:
Kegan Dougal
2016-01-11 17:15:52 +00:00
parent 97003f7382
commit 51fe73bc27

View File

@@ -137,7 +137,8 @@ module.exports.MatrixEvent.prototype = {
* @return {Object} The previous event content JSON, or an empty object.
*/
getPrevContent: function() {
return this.event.prev_content || {};
// v2 then v1 then default
return this.getUnsigned().prev_content || this.event.prev_content || {};
},
/**