diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-11-17 01:24:44 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-11-17 01:24:44 +0900 |
| commit | c614e6f5d73b3b4314c7f6abf52260e58cc176ad (patch) | |
| tree | b8ad5a47d532a9af4060022e5ef3de4166f884c5 /src/web/app/common/scripts/streaming/messaging-stream.ts | |
| parent | typo (diff) | |
| download | sharkey-c614e6f5d73b3b4314c7f6abf52260e58cc176ad.tar.gz sharkey-c614e6f5d73b3b4314c7f6abf52260e58cc176ad.tar.bz2 sharkey-c614e6f5d73b3b4314c7f6abf52260e58cc176ad.zip | |
#925, #926, and refactoring
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 + }); + }); + } +} |