src/store/memory.js
function(room) {
        this.rooms[room.roomId] = room;
        // add listeners for room member changes so we can keep the room member
        // map up-to-date.
        room.currentState.on("RoomState.members", this._onRoomMember.bind(this));
        // add existing members
        const self = this;
        room.currentState.getMembers().forEach(function(m) {
            self._onRoomMember(null, room.currentState, m);
        });
    }
function(room) {
        this.rooms[room.roomId] = room;
        // add listeners for room member changes so we can keep the room member
        // map up-to-date.
        room.currentState.on("RoomState.members", this._onRoomMember.bind(this));
        // add existing members
        const self = this;
        room.currentState.getMembers().forEach(function(m) {
            self._onRoomMember(null, room.currentState, m);
        });
    }
function ( room ) { this . rooms [ room . roomId ] = room ; // add listeners for room member changes so we can keep the room member // map up-to-date. room . currentState . on ( "RoomState.members" , this . _onRoomMember . bind ( this ) ) ; // add existing members const self = this ; room . currentState . getMembers ( ) . forEach ( function ( m ) { self . _onRoomMember ( null , room . currentState , m ) ; } ) ; }
Store the given room.
@param {Room} room The room to be stored. All properties must be stored.
Store the given room .