summaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2020-04-02 22:17:17 +0900
committersyuilo <syuilotan@yahoo.co.jp>2020-04-02 22:17:17 +0900
commit9e9d378bf1301d4c3fcde08543be1014c71a87cd (patch)
treea902b1d1fbec9062046ea1049d74ebf430c65f32 /src/services
parentUpdate api.ja-JP.md (diff)
downloadsharkey-9e9d378bf1301d4c3fcde08543be1014c71a87cd.tar.gz
sharkey-9e9d378bf1301d4c3fcde08543be1014c71a87cd.tar.bz2
sharkey-9e9d378bf1301d4c3fcde08543be1014c71a87cd.zip
feat(streaming): Add emoji added event
Diffstat (limited to 'src/services')
-rw-r--r--src/services/stream.ts5
1 files changed, 5 insertions, 0 deletions
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;