diff options
| author | こぴなたみぽ <Syuilotan@yahoo.co.jp> | 2017-11-01 04:18:32 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-01 04:18:32 +0900 |
| commit | 2a00930150207c983a2f6e111d03f2db33b897b9 (patch) | |
| tree | f41dc9bcc5498ac89839057e07910b9c2d81fed3 /src/api/event.ts | |
| parent | v2752 (diff) | |
| parent | v2769 (diff) | |
| download | misskey-2a00930150207c983a2f6e111d03f2db33b897b9.tar.gz misskey-2a00930150207c983a2f6e111d03f2db33b897b9.tar.bz2 misskey-2a00930150207c983a2f6e111d03f2db33b897b9.zip | |
Merge pull request #854 from syuilo/bbs
Bbs
Diffstat (limited to 'src/api/event.ts')
| -rw-r--r-- | src/api/event.ts | 6 |
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); |