mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-20 20:16:06 -04:00
fix: fallback to passing URL through if January is not enabled
This commit is contained in:
+5
-1
@@ -169,7 +169,7 @@ export class Client extends EventEmitter<Events> {
|
||||
/**
|
||||
* Create Revolt.js Client
|
||||
*/
|
||||
constructor(options?: Partial<ClientOptions>) {
|
||||
constructor(options?: Partial<ClientOptions>, configuration?: RevoltConfig) {
|
||||
super();
|
||||
|
||||
this.options = {
|
||||
@@ -197,6 +197,8 @@ export class Client extends EventEmitter<Events> {
|
||||
...options,
|
||||
};
|
||||
|
||||
this.configuration = configuration;
|
||||
|
||||
this.api = new API({
|
||||
baseURL: this.options.baseURL,
|
||||
});
|
||||
@@ -369,6 +371,8 @@ export class Client extends EventEmitter<Events> {
|
||||
return `${
|
||||
this.configuration.features.january.url
|
||||
}/proxy?url=${encodeURIComponent(url)}`;
|
||||
} else {
|
||||
return url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user