mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-11 10:43:08 +02:00
21 lines
315 B
TypeScript
21 lines
315 B
TypeScript
import Stream from './stream';
|
|
|
|
/**
|
|
* Messaging stream connection
|
|
*/
|
|
class Connection extends Stream {
|
|
constructor(me, otherparty) {
|
|
super('messaging', {
|
|
i: me.token,
|
|
otherparty
|
|
});
|
|
|
|
(this as any).on('_connected_', () => {
|
|
this.send({
|
|
i: me.token
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
export default Connection;
|