summaryrefslogtreecommitdiff
path: root/src/stream.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-01-27 14:55:02 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-01-27 14:55:02 +0900
commitd906d9001052d2cde05b1bd9c2fbfb23a5a66cd2 (patch)
tree6d1417a097942180407fc844cb5b60d886dd0893 /src/stream.ts
parentCelan up (diff)
downloadsharkey-d906d9001052d2cde05b1bd9c2fbfb23a5a66cd2.tar.gz
sharkey-d906d9001052d2cde05b1bd9c2fbfb23a5a66cd2.tar.bz2
sharkey-d906d9001052d2cde05b1bd9c2fbfb23a5a66cd2.zip
[Server] Introduce admin stream channel
Diffstat (limited to 'src/stream.ts')
-rw-r--r--src/stream.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stream.ts b/src/stream.ts
index 596cb98e72..098d49ecd1 100644
--- a/src/stream.ts
+++ b/src/stream.ts
@@ -87,6 +87,10 @@ class Publisher {
public publishApLogStream = (log: any): void => {
this.publish('apLog', null, log);
}
+
+ public publishAdminStream = (userId: ID, type: string, value?: any): void => {
+ this.publish(`adminStream:${userId}`, type, typeof value === 'undefined' ? null : value);
+ }
}
const publisher = new Publisher();
@@ -107,3 +111,4 @@ export const publishHybridTimelineStream = publisher.publishHybridTimelineStream
export const publishGlobalTimelineStream = publisher.publishGlobalTimelineStream;
export const publishHashtagStream = publisher.publishHashtagStream;
export const publishApLogStream = publisher.publishApLogStream;
+export const publishAdminStream = publisher.publishAdminStream;