summaryrefslogtreecommitdiff
path: root/src/services/stream.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-03-23 15:06:56 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-03-23 15:06:56 +0900
commit7e4a800352dd1de91a7a6c457b39f297d76fd9bf (patch)
tree174117f77dcc50defb3081b94a67c3de5c63c5cf /src/services/stream.ts
parentコミット忘れ (diff)
downloadmisskey-7e4a800352dd1de91a7a6c457b39f297d76fd9bf.tar.gz
misskey-7e4a800352dd1de91a7a6c457b39f297d76fd9bf.tar.bz2
misskey-7e4a800352dd1de91a7a6c457b39f297d76fd9bf.zip
noteのread処理
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 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;