summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts/streaming/home-stream.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/app/common/scripts/streaming/home-stream.ts')
-rw-r--r--src/web/app/common/scripts/streaming/home-stream.ts36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/web/app/common/scripts/streaming/home-stream.ts b/src/web/app/common/scripts/streaming/home-stream.ts
deleted file mode 100644
index 3516705e22..0000000000
--- a/src/web/app/common/scripts/streaming/home-stream.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import * as merge from 'object-assign-deep';
-
-import Stream from './stream';
-import MiOS from '../../mios';
-
-/**
- * Home stream connection
- */
-export default class Connection extends Stream {
- constructor(os: MiOS, me) {
- super('', {
- i: me.token
- });
-
- // 最終利用日時を更新するため定期的にaliveメッセージを送信
- setInterval(() => {
- this.send({ type: 'alive' });
- me.last_used_at = new Date();
- }, 1000 * 60);
-
- // 自分の情報が更新されたとき
- this.on('i_updated', i => {
- if (os.debug) {
- console.log('I updated:', i);
- }
- merge(me, i);
- });
-
- // トークンが再生成されたとき
- // このままではAPIが利用できないので強制的にサインアウトさせる
- this.on('my_token_regenerated', () => {
- alert('%i18n:common.my-token-regenerated%');
- os.signout();
- });
- }
-}