feat: socket clients/intercom
This commit is contained in:
parent
119835fb0d
commit
d4b8af601d
|
@ -20,6 +20,12 @@ export default {
|
||||||
'@latus/user/session': (latus) => ({
|
'@latus/user/session': (latus) => ({
|
||||||
store: new RedisStore({client: createClient(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) => {
|
'@latus/socket/server': (latus) => {
|
||||||
const pubClient = createClient(latus);
|
const pubClient = createClient(latus);
|
||||||
const subClient = createClient(latus);
|
const subClient = createClient(latus);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user