summaryrefslogtreecommitdiff
path: root/src/services/stream.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/stream.ts')
-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;