mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-14 21:03:09 +02:00
23 lines
321 B
JavaScript
23 lines
321 B
JavaScript
'use strict';
|
|
|
|
import Stream from './stream';
|
|
|
|
/**
|
|
* Messaging stream connection
|
|
*/
|
|
class Connection extends Stream {
|
|
constructor(me, otherparty) {
|
|
super('messaging', {
|
|
i: me.token,
|
|
otherparty
|
|
});
|
|
|
|
this.on('_connected_', () => {
|
|
this.send({
|
|
i: me.token
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
export default Connection;
|