diff options
| author | こぴなたみぽ <Syuilotan@yahoo.co.jp> | 2017-11-06 19:04:38 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-06 19:04:38 +0900 |
| commit | 5dd93272dda3b54973f6cbe896a36b4c0d0b1588 (patch) | |
| tree | 60fea740d9482851583a6582ef777bdffb8db1eb /src/api/event.ts | |
| parent | chore(package): update @types/express to version 4.0.39 (diff) | |
| parent | Merge pull request #867 from syuilo/greenkeeper/@types/mongodb-2.2.15 (diff) | |
| download | misskey-5dd93272dda3b54973f6cbe896a36b4c0d0b1588.tar.gz misskey-5dd93272dda3b54973f6cbe896a36b4c0d0b1588.tar.bz2 misskey-5dd93272dda3b54973f6cbe896a36b4c0d0b1588.zip | |
Merge branch 'master' into greenkeeper/@types/express-4.0.39
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); |