Fix incompatibility with Node.js 10 versions prior to 10.9.0
parent
6635fe1414
commit
518bf93f6f
|
@ -7,7 +7,7 @@
|
||||||
* New rewritten instructions for setting up and using the bot
|
* New rewritten instructions for setting up and using the bot
|
||||||
* New easy-to-use `start.bat` file for Windows
|
* New easy-to-use `start.bat` file for Windows
|
||||||
* Update several package dependencies
|
* 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
|
## v2.28.0
|
||||||
* Fix error when saving attachments locally with `attachmentStorage` set to `"local"` (default) when the bot's folder is
|
* Fix error when saving attachments locally with `attachmentStorage` set to `"local"` (default) when the bot's folder is
|
||||||
|
|
|
@ -39,12 +39,12 @@ async function refreshVersions() {
|
||||||
const [, owner, repo] = parsedUrl.pathname.split('/');
|
const [, owner, repo] = parsedUrl.pathname.split('/');
|
||||||
if (! owner || ! repo) return;
|
if (! owner || ! repo) return;
|
||||||
|
|
||||||
const apiUrl = `https://api.github.com/repos/${owner}/${repo}/tags`;
|
|
||||||
https.get(
|
https.get(
|
||||||
apiUrl,
|
|
||||||
{
|
{
|
||||||
|
hostname: 'api.github.com',
|
||||||
|
path: `/repos/${owner}/${repo}/tags`,
|
||||||
headers: {
|
headers: {
|
||||||
'User-Agent': `Modmailbot (https://github.com/${owner}/${repo}) (${packageJson.version})`
|
'User-Agent': `Modmail Bot (https://github.com/${owner}/${repo}) (${packageJson.version})`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async res => {
|
async res => {
|
||||||
|
|
Loading…
Reference in New Issue