From 9e9d378bf1301d4c3fcde08543be1014c71a87cd Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 2 Apr 2020 22:17:17 +0900 Subject: feat(streaming): Add emoji added event --- src/services/stream.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/services') diff --git a/src/services/stream.ts b/src/services/stream.ts index 269aed56b9..ec43c6ff2c 100644 --- a/src/services/stream.ts +++ b/src/services/stream.ts @@ -19,6 +19,10 @@ class Publisher { })); } + public publishBroadcastStream = (type: string, value?: any): void => { + this.publish('broadcast', type, typeof value === 'undefined' ? null : value); + } + public publishMainStream = (userId: User['id'], type: string, value?: any): void => { this.publish(`mainStream:${userId}`, type, typeof value === 'undefined' ? null : value); } @@ -75,6 +79,7 @@ const publisher = new Publisher(); export default publisher; +export const publishBroadcastStream = publisher.publishBroadcastStream; export const publishMainStream = publisher.publishMainStream; export const publishDriveStream = publisher.publishDriveStream; export const publishNoteStream = publisher.publishNoteStream; -- cgit v1.2.3-freya