jormungandr-bite/src/web/app/common/scripts/streaming/messaging.ts
syuilo 0c481a3f9e ✌️
2018-03-15 19:53:46 +09:00

20 lines
344 B
TypeScript

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