summaryrefslogtreecommitdiff
path: root/src/api/event.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-03-20 13:54:59 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-03-20 13:55:04 +0900
commit0610acbf6eef11a9a85cc35851150cb3cc072785 (patch)
tree8d53c24c38ba7de3c64c4ff780c7f35d828ef554 /src/api/event.ts
parentMerge pull request #301 from syuilo/greenkeeper/gulp-uglify-2.1.1 (diff)
downloadmisskey-0610acbf6eef11a9a85cc35851150cb3cc072785.tar.gz
misskey-0610acbf6eef11a9a85cc35851150cb3cc072785.tar.bz2
misskey-0610acbf6eef11a9a85cc35851150cb3cc072785.zip
#302
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 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);