3 var renderChat
= require('./chat-internal');
4 var roomMembershipService
= require('gitter-web-rooms/lib/room-membership-service');
6 function renderSecondaryView(req
, res
, next
, options
) {
7 var uriContext
= options
.uriContext
;
8 var troupe
= uriContext
.troupe
;
10 if (!troupe
) return next('route');
13 .countMembersInRoom(req
.troupe
._id
)
14 .then(function(userCount
) {
17 uriContext
: req
.uriContext
,
18 classNames
: ['embedded'],
22 usersOnline
: userCount
27 return renderChat(req
, res
, next
, {
29 template
: 'chat-embed-template',
30 script
: 'router-embed-chat'
33 return renderChat(req
, res
, next
, {
35 template
: 'chat-nli-embed-template',
36 script
: 'router-nli-embed-chat'
44 renderSecondaryView
: renderSecondaryView