wip
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import * as mongo from 'mongodb';
|
||||
import * as redis from 'redis';
|
||||
import swPush from './common/push-sw';
|
||||
import config from '../conf';
|
||||
|
||||
type ID = string | mongo.ObjectID;
|
||||
@@ -17,6 +18,10 @@ class MisskeyEvent {
|
||||
this.publish(`user-stream:${userId}`, type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
|
||||
public publishSw(userId: ID, type: string, value?: any): void {
|
||||
swPush(userId, type, value);
|
||||
}
|
||||
|
||||
public publishDriveStream(userId: ID, type: string, value?: any): void {
|
||||
this.publish(`drive-stream:${userId}`, type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
@@ -50,6 +55,8 @@ const ev = new MisskeyEvent();
|
||||
|
||||
export default ev.publishUserStream.bind(ev);
|
||||
|
||||
export const pushSw = ev.publishSw.bind(ev);
|
||||
|
||||
export const publishDriveStream = ev.publishDriveStream.bind(ev);
|
||||
|
||||
export const publishPostStream = ev.publishPostStream.bind(ev);
|
||||
|
Reference in New Issue
Block a user