parent
1809800980
commit
3f8ebac466
46 changed files with 244 additions and 225 deletions
|
|
@ -1,6 +1,7 @@
|
|||
declare const _API_URL_: string;
|
||||
|
||||
import { EventEmitter } from 'eventemitter3';
|
||||
import * as ReconnectingWebsocket from 'reconnecting-websocket';
|
||||
import CONFIG from '../config';
|
||||
|
||||
/**
|
||||
* Misskey stream connection
|
||||
|
|
@ -24,7 +25,7 @@ export default class Connection extends EventEmitter {
|
|||
this.state = 'initializing';
|
||||
this.buffer = [];
|
||||
|
||||
const host = CONFIG.apiUrl.replace('http', 'ws');
|
||||
const host = _API_URL_.replace('http', 'ws');
|
||||
const query = params
|
||||
? Object.keys(params)
|
||||
.map(k => encodeURIComponent(k) + '=' + encodeURIComponent(params[k]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue