From 161fd4afab323ca6bf491def473f84bb7557b481 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 7 Mar 2018 17:48:32 +0900 Subject: wip --- .../app/common/scripts/streaming/home-stream.ts | 36 ---------------------- 1 file changed, 36 deletions(-) delete mode 100644 src/web/app/common/scripts/streaming/home-stream.ts (limited to 'src/web/app/common/scripts/streaming/home-stream.ts') 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(); - }); - } -} -- cgit v1.2.3-freya