diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2021-02-20 20:20:05 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2021-02-20 20:20:05 +0900 |
| commit | 25d37302a8bfda954c7ede1e9d355db587c82228 (patch) | |
| tree | 8d2eff01cc738a84776976d36cabc8a143b40798 /src/services | |
| parent | Improve usability (diff) | |
| download | sharkey-25d37302a8bfda954c7ede1e9d355db587c82228.tar.gz sharkey-25d37302a8bfda954c7ede1e9d355db587c82228.tar.bz2 sharkey-25d37302a8bfda954c7ede1e9d355db587c82228.zip | |
チャンネルで入力中ユーザーを表示するように、Chat UIでタイムラインでは投稿フォームを上に表示するように
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/stream.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/services/stream.ts b/src/services/stream.ts index ec43c6ff2c..d833d700fe 100644 --- a/src/services/stream.ts +++ b/src/services/stream.ts @@ -6,6 +6,7 @@ import { ReversiGame } from '../models/entities/games/reversi/game'; import { UserGroup } from '../models/entities/user-group'; import config from '../config'; import { Antenna } from '../models/entities/antenna'; +import { Channel } from '../models/entities/channel'; class Publisher { private publish = (channel: string, type: string | null, value?: any): void => { @@ -38,6 +39,10 @@ class Publisher { }); } + public publishChannelStream = (channelId: Channel['id'], type: string, value?: any): void => { + this.publish(`channelStream:${channelId}`, type, typeof value === 'undefined' ? null : value); + } + public publishUserListStream = (listId: UserList['id'], type: string, value?: any): void => { this.publish(`userListStream:${listId}`, type, typeof value === 'undefined' ? null : value); } @@ -84,6 +89,7 @@ export const publishMainStream = publisher.publishMainStream; export const publishDriveStream = publisher.publishDriveStream; export const publishNoteStream = publisher.publishNoteStream; export const publishNotesStream = publisher.publishNotesStream; +export const publishChannelStream = publisher.publishChannelStream; export const publishUserListStream = publisher.publishUserListStream; export const publishAntennaStream = publisher.publishAntennaStream; export const publishMessagingStream = publisher.publishMessagingStream; |