src/crypto/DeviceList.js
/**
     * Mark the cached device list for the given user outdated.
     *
     * This doesn't set off an update, so that several users can be batched
     * together. Call refreshOutdatedDeviceLists() for that.
     *
     * @param {String} userId
     */
Mark the cached device list for the given user outdated.
This doesn't set off an update, so that several users can be batched
together. Call refreshOutdatedDeviceLists() for that.

@param {String} userId
Mark the cached device list for the given user outdated . This doesn ' t set off an update so that several users can be batched together . Call refreshOutdatedDeviceLists () for that . @param { String } userId
invalidateUserDeviceList(userId) {
        if (typeof userId !== 'string') {
            throw new Error('userId must be a string; was '+userId);
        }
        this._pendingUsersWithNewDevices[userId] = true;
    }
invalidateUserDeviceList ( userId ) { if ( typeof userId !== 'string' ) { throw new Error ( 'userId must be a string; was ' + userId ) ; } this . _pendingUsersWithNewDevices [ userId ] = true ; }
Mark the cached device list for the given user outdated.
Mark the cached device list for the given user outdated .
// sanity-check the userId. This is mostly paranoia, but if synapse // can't parse the userId we give it as an mxid, it 500s the whole // request and we can never update the device lists again (because // the broken userId is always 'invalid' and always included in any // refresh request). // By checking it is at least a string, we can eliminate a class of // silly errors.