diff --git a/packages/redis/src/session.js b/packages/redis/src/session.js index e07d8a7..d7c6e2d 100644 --- a/packages/redis/src/session.js +++ b/packages/redis/src/session.js @@ -20,6 +20,12 @@ export default { '@latus/user/session': (latus) => ({ store: new RedisStore({client: createClient(latus)}), }), + '@latus/socket/connect': ({req}) => { + const {adapter} = req; + const customRequest = promisify(adapter.customRequest.bind(req.adapter)); + req.intercom = (type, payload) => customRequest(type, payload); + req.clients = promisify(adapter.clients.bind(adapter)); + }, '@latus/socket/server': (latus) => { const pubClient = createClient(latus); const subClient = createClient(latus);