noteのread処理
This commit is contained in:
parent
00bc097abb
commit
7e4a800352
10 changed files with 132 additions and 57 deletions
|
|
@ -20,6 +20,10 @@ class Publisher {
|
|||
}));
|
||||
}
|
||||
|
||||
public publishInternalEvent = (type: string, value?: any): void => {
|
||||
this.publish('internal', type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
|
||||
public publishUserEvent = (userId: User['id'], type: string, value?: any): void => {
|
||||
this.publish(`user:${userId}`, type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
|
|
@ -88,6 +92,7 @@ const publisher = new Publisher();
|
|||
|
||||
export default publisher;
|
||||
|
||||
export const publishInternalEvent = publisher.publishInternalEvent;
|
||||
export const publishUserEvent = publisher.publishUserEvent;
|
||||
export const publishBroadcastStream = publisher.publishBroadcastStream;
|
||||
export const publishMainStream = publisher.publishMainStream;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue