mizzkey/src/web/app/common/scripts/streaming/messaging.ts
2018-03-07 17:48:32 +09:00

20 lines
299 B
TypeScript

import Stream from './stream';
/**
* Messaging stream connection
*/
export class MessagingStream extends Stream {
constructor(me, otherparty) {
super('messaging', {
i: me.token,
otherparty
});
(this as any).on('_connected_', () => {
this.send({
i: me.token
});
});
}
}