diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-07-11 09:36:30 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-07-11 09:36:30 +0900 |
| commit | eb392b125105f9949f84a6fd654694238457a18f (patch) | |
| tree | 4978826789dd054ba1538b46087d9d438beec3c0 /src/client/app/common/scripts/streaming | |
| parent | Update call.ts (diff) | |
| download | misskey-eb392b125105f9949f84a6fd654694238457a18f.tar.gz misskey-eb392b125105f9949f84a6fd654694238457a18f.tar.bz2 misskey-eb392b125105f9949f84a6fd654694238457a18f.zip | |
wip
Diffstat (limited to 'src/client/app/common/scripts/streaming')
| -rw-r--r-- | src/client/app/common/scripts/streaming/hybrid-timeline.ts | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/client/app/common/scripts/streaming/hybrid-timeline.ts b/src/client/app/common/scripts/streaming/hybrid-timeline.ts new file mode 100644 index 0000000000..cd290797c4 --- /dev/null +++ b/src/client/app/common/scripts/streaming/hybrid-timeline.ts @@ -0,0 +1,34 @@ +import Stream from './stream'; +import StreamManager from './stream-manager'; +import MiOS from '../../../mios'; + +/** + * Hybrid timeline stream connection + */ +export class HybridTimelineStream extends Stream { + constructor(os: MiOS, me) { + super(os, 'hybrid-timeline', { + i: me.token + }); + } +} + +export class HybridTimelineStreamManager extends StreamManager<HybridTimelineStream> { + private me; + private os: MiOS; + + constructor(os: MiOS, me) { + super(); + + this.me = me; + this.os = os; + } + + public getConnection() { + if (this.connection == null) { + this.connection = new HybridTimelineStream(this.os, this.me); + } + + return this.connection; + } +} |