mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-24 17:59:05 +01:00
10 lines
314 B
TypeScript
10 lines
314 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 drive stream
|
|
subscriber.on(`drive-stream:${user._id}`, data => {
|
|
connection.send(JSON.stringify(data));
|
|
});
|
|
}
|