3 var userSettingsService = require('gitter-web-user-settings');
5 function getSnapshotsForPageContext(req) {
6 if (!req.user) return {};
7 return userSettingsService
8 .getUserSettings(req.user._id, 'rightToolbar')
9 .then(function(rightToolbarUserSettings) {
12 if (!rightToolbarUserSettings || rightToolbarUserSettings.isPinned === undefined) {
16 isPinned = rightToolbarUserSettings.isPinned;
24 module.exports = getSnapshotsForPageContext;