mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-09 00:23:08 +02:00
9 lines
334 B
TypeScript
9 lines
334 B
TypeScript
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));
|
|
});
|
|
}
|