diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-04-02 22:17:17 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-04-02 22:17:17 +0900 |
| commit | 9e9d378bf1301d4c3fcde08543be1014c71a87cd (patch) | |
| tree | a902b1d1fbec9062046ea1049d74ebf430c65f32 /src/services | |
| parent | Update api.ja-JP.md (diff) | |
| download | sharkey-9e9d378bf1301d4c3fcde08543be1014c71a87cd.tar.gz sharkey-9e9d378bf1301d4c3fcde08543be1014c71a87cd.tar.bz2 sharkey-9e9d378bf1301d4c3fcde08543be1014c71a87cd.zip | |
feat(streaming): Add emoji added event
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/stream.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/services/stream.ts b/src/services/stream.ts index 269aed56b9..ec43c6ff2c 100644 --- a/src/services/stream.ts +++ b/src/services/stream.ts @@ -19,6 +19,10 @@ class Publisher { })); } + public publishBroadcastStream = (type: string, value?: any): void => { + this.publish('broadcast', type, typeof value === 'undefined' ? null : value); + } + public publishMainStream = (userId: User['id'], type: string, value?: any): void => { this.publish(`mainStream:${userId}`, type, typeof value === 'undefined' ? null : value); } @@ -75,6 +79,7 @@ const publisher = new Publisher(); export default publisher; +export const publishBroadcastStream = publisher.publishBroadcastStream; export const publishMainStream = publisher.publishMainStream; export const publishDriveStream = publisher.publishDriveStream; export const publishNoteStream = publisher.publishNoteStream; |