summaryrefslogtreecommitdiff
path: root/src/api/event.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-11-01 03:17:14 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-11-01 03:17:14 +0900
commitf37fb38640a31c4b8865a5562628197ff21f3cce (patch)
treec68d1b73aeb8c0c61d6a76ed4577036d4c3c04a5 /src/api/event.ts
parentwip (diff)
downloadmisskey-f37fb38640a31c4b8865a5562628197ff21f3cce.tar.gz
misskey-f37fb38640a31c4b8865a5562628197ff21f3cce.tar.bz2
misskey-f37fb38640a31c4b8865a5562628197ff21f3cce.zip
wip
Diffstat (limited to 'src/api/event.ts')
-rw-r--r--src/api/event.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/api/event.ts b/src/api/event.ts
index 9613a9f7cc..909b0d2556 100644
--- a/src/api/event.ts
+++ b/src/api/event.ts
@@ -25,6 +25,10 @@ class MisskeyEvent {
this.publish(`messaging-stream:${userId}-${otherpartyId}`, type, typeof value === 'undefined' ? null : value);
}
+ public publishChannelStream(channelId: ID, type: string, value?: any): void {
+ this.publish(`channel-stream:${channelId}`, type, typeof value === 'undefined' ? null : value);
+ }
+
private publish(channel: string, type: string, value?: any): void {
const message = value == null ?
{ type: type } :
@@ -41,3 +45,5 @@ export default ev.publishUserStream.bind(ev);
export const publishPostStream = ev.publishPostStream.bind(ev);
export const publishMessagingStream = ev.publishMessagingStream.bind(ev);
+
+export const publishChannelStream = ev.publishChannelStream.bind(ev);