diff options
| author | ha-dai <contact@haradai.net> | 2017-11-27 03:41:47 +0900 |
|---|---|---|
| committer | ha-dai <contact@haradai.net> | 2017-11-27 03:41:47 +0900 |
| commit | 6c75bc6d5188cbbf80fe1086fa0e8828f4edb873 (patch) | |
| tree | 3ffedcc3a06e53269e92d2990cf0b3bb247ac04a /src/web/app/common/scripts/streaming/messaging-stream.ts | |
| parent | Merge branch 'master' of https://github.com/syuilo/misskey (diff) | |
| parent | Update dependencies :rocket: (diff) | |
| download | misskey-6c75bc6d5188cbbf80fe1086fa0e8828f4edb873.tar.gz misskey-6c75bc6d5188cbbf80fe1086fa0e8828f4edb873.tar.bz2 misskey-6c75bc6d5188cbbf80fe1086fa0e8828f4edb873.zip | |
Merge branch 'master' of github.com:syuilo/misskey
Diffstat (limited to 'src/web/app/common/scripts/streaming/messaging-stream.ts')
| -rw-r--r-- | src/web/app/common/scripts/streaming/messaging-stream.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/web/app/common/scripts/streaming/messaging-stream.ts b/src/web/app/common/scripts/streaming/messaging-stream.ts new file mode 100644 index 0000000000..68dfc5ec09 --- /dev/null +++ b/src/web/app/common/scripts/streaming/messaging-stream.ts @@ -0,0 +1,19 @@ +import Stream from './stream'; + +/** + * Messaging stream connection + */ +export default class Connection extends Stream { + constructor(me, otherparty) { + super('messaging', { + i: me.token, + otherparty + }); + + (this as any).on('_connected_', () => { + this.send({ + i: me.token + }); + }); + } +} |