mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2025-04-16 18:41:37 +03:00
20 lines
360 B
TypeScript
20 lines
360 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.account.token,
|
|
otherparty
|
|
});
|
|
|
|
(this as any).on('_connected_', () => {
|
|
this.send({
|
|
i: me.account.token
|
|
});
|
|
});
|
|
}
|
|
}
|