mirror of
https://github.com/MisskeyIO/misskey
synced 2024-12-17 08:09:09 +09:00
11 lines
368 B
TypeScript
11 lines
368 B
TypeScript
import * as websocket from 'websocket';
|
|
import * as redis from 'redis';
|
|
|
|
export default function(request: websocket.request, connection: websocket.connection, subscriber: redis.RedisClient, user: any): void {
|
|
// Subscribe drive stream
|
|
subscriber.subscribe(`misskey:drive-stream:${user._id}`);
|
|
subscriber.on('message', (_, data) => {
|
|
connection.send(data);
|
|
});
|
|
}
|