From 0610acbf6eef11a9a85cc35851150cb3cc072785 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 20 Mar 2017 13:54:59 +0900 Subject: #302 --- src/api/event.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/api/event.ts') diff --git a/src/api/event.ts b/src/api/event.ts index 24541ee26e..39dc809bdc 100644 --- a/src/api/event.ts +++ b/src/api/event.ts @@ -25,6 +25,10 @@ class MisskeyEvent { this.publish(`user-stream:${userId}`, type, typeof value === 'undefined' ? null : value); } + public publishPostStream(postId: ID, type: string, value?: any): void { + this.publish(`post-stream:${postId}`, type, typeof value === 'undefined' ? null : value); + } + public publishMessagingStream(userId: ID, otherpartyId: ID, type: string, value?: any): void { this.publish(`messaging-stream:${userId}-${otherpartyId}`, type, typeof value === 'undefined' ? null : value); } @@ -34,4 +38,6 @@ const ev = new MisskeyEvent(); export default ev.publishUserStream.bind(ev); +export const publishPostStream = ev.publishPostStream.bind(ev); + export const publishMessagingStream = ev.publishMessagingStream.bind(ev); -- cgit v1.2.3-freya