diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f8cbdf..7ad867c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ * New rewritten instructions for setting up and using the bot * New easy-to-use `start.bat` file for Windows * Update several package dependencies -* Fixed incompatibility with certain Node.js 10 versions +* Fixed incompatibility with Node.js 10 versions prior to 10.9.0 ## v2.28.0 * Fix error when saving attachments locally with `attachmentStorage` set to `"local"` (default) when the bot's folder is diff --git a/src/data/updates.js b/src/data/updates.js index 36d4239..d5a574e 100644 --- a/src/data/updates.js +++ b/src/data/updates.js @@ -39,12 +39,12 @@ async function refreshVersions() { const [, owner, repo] = parsedUrl.pathname.split('/'); if (! owner || ! repo) return; - const apiUrl = `https://api.github.com/repos/${owner}/${repo}/tags`; https.get( - apiUrl, { + hostname: 'api.github.com', + path: `/repos/${owner}/${repo}/tags`, headers: { - 'User-Agent': `Modmailbot (https://github.com/${owner}/${repo}) (${packageJson.version})` + 'User-Agent': `Modmail Bot (https://github.com/${owner}/${repo}) (${packageJson.version})` } }, async res => {