You've already forked matrix-js-sdk
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:
@@ -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 || {};
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user