diff --git a/app.js b/app.js index 208c3a0..74a6207 100644 --- a/app.js +++ b/app.js @@ -850,7 +850,7 @@ function writeConfigToFile(filePath) { function updatePortInUrl(url) { if (!url) return url; const urlObject = new URL(url); - if(urlObject.port == 443) return urlObject.toString(); + if(!urlObject.host.startsWith("localhost")) return urlObject.toString(); urlObject.port = servePort; return urlObject.toString(); } diff --git a/chatBot/includes/Client.js b/chatBot/includes/Client.js index b40677e..d44982e 100644 --- a/chatBot/includes/Client.js +++ b/chatBot/includes/Client.js @@ -40,8 +40,9 @@ class Client extends EventEmitter { async fetchAvatar(url) { this.botAvatar = url; - const img = await fetch(url); - this.sendMessage(IconMessage.new(this, img)); + const web = await fetch(url); + const img = await web.body.getReader().read(); + this.sendMessage(IconMessage.new(this, img.value)); } setupSwarm() {