3 var userService = require('gitter-web-users');
4 var UserStrategy = require('./user-strategy');
6 const mongoReadPrefs = require('gitter-web-persistence-utils/lib/mongo-read-prefs');
7 var idStrategyGenerator = require('gitter-web-serialization/lib/id-strategy-generator');
9 var UserIdStrategy = idStrategyGenerator('UserIdStrategy', UserStrategy, ids => {
10 return userService.findByIds(ids, { read: mongoReadPrefs.secondaryPreferred });
13 UserIdStrategy.slim = function(options) {
14 var strategy = UserStrategy.slim(options);
15 return UserIdStrategy.withStrategy(strategy);
18 module.exports = UserIdStrategy;