mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2025-01-03 04:02:52 +09:00
24 lines
321 B
JavaScript
24 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;
|