blob: 9af63f2812dd88f1b4b28593cda8b1c12db621da (
plain)
1
2
3
4
5
6
7
8
9
|
import * as websocket from 'websocket';
import Xev from 'xev';
export default function(request: websocket.request, connection: websocket.connection, subscriber: Xev, user: any): void {
// Subscribe messaging index stream
subscriber.on(`messaging-index-stream:${user._id}`, data => {
connection.send(JSON.stringify(data));
});
}
|