diff --git a/lib/store/memory.js b/lib/store/memory.js index 9db001fe7..311478d74 100644 --- a/lib/store/memory.js +++ b/lib/store/memory.js @@ -256,13 +256,14 @@ module.exports.MatrixInMemoryStore.prototype = { storeAccountDataEvents: function(events) { var self = this; events.forEach(function(event) { - self.accountData[event.type] = event.content; + self.accountData[event.getType()] = event; }); }, /** * Get account data event by event type * @param {string} eventType The event type being queried + * @return {MatrixEvent} the user account_data event of given type */ getAccountData: function(eventType) { return this.accountData[eventType];