mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-01-16 10:31:00 -07:00
20 lines
344 B
TypeScript
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
|
|
});
|
|
});
|
|
}
|
|
}
|