3 var presenceService
= require('gitter-web-presence');
5 module
.exports = function(req
, res
, next
) {
6 var socketId
= String(req
.params
.socketId
);
7 var userId
= req
.user
&& req
.user
.id
;
9 presenceService
.socketDisconnectionRequested(userId
, socketId
, function(err
) {
11 if (err
.invalidSocketId
) {
12 return res
.sendStatus(400);