1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-03 03:15:58 +02:00

Initial commit 🍀

This commit is contained in:
syuilo
2016-12-29 07:49:51 +09:00
commit b3f42e62af
405 changed files with 29181 additions and 0 deletions

10
src/api/stream/home.ts Normal file
View File

@@ -0,0 +1,10 @@
import * as websocket from 'websocket';
import * as redis from 'redis';
export default function homeStream(request: websocket.request, connection: websocket.connection, subscriber: redis.RedisClient, user: any): void {
// Subscribe Home stream channel
subscriber.subscribe(`misskey:user-stream:${user._id}`);
subscriber.on('message', (_, data) => {
connection.send(data);
});
}