src/store/memory.js
function(events) {
        const self = this;
        events.forEach(function(event) {
            self.accountData[event.getType()] = event;
        });
    }
function(events) {
        const self = this;
        events.forEach(function(event) {
            self.accountData[event.getType()] = event;
        });
    }
function ( events ) { const self = this ; events . forEach ( function ( event ) { self . accountData [ event . getType ( ) ] = event ; } ) ; }
Store user-scoped account data events.
N.B. that account data only allows a single event per type, so multiple
events with the same type will replace each other.
@param {Array<MatrixEvent>} events The events to store.
Store user - scoped account data events . N . B . that account data only allows a single event per type so multiple events with the same type will replace each other .