From 7e4a800352dd1de91a7a6c457b39f297d76fd9bf Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 23 Mar 2021 15:06:56 +0900 Subject: noteのread処理 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/stream.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/services/stream.ts') diff --git a/src/services/stream.ts b/src/services/stream.ts index a8855b62e6..6d7c2c4922 100644 --- a/src/services/stream.ts +++ b/src/services/stream.ts @@ -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; -- cgit v1.2.3-freya