Skip to content

Commit

Permalink
updated dependencies, removed reuqest dep
Browse files Browse the repository at this point in the history
  • Loading branch information
windka committed Jun 21, 2024
1 parent 0b87724 commit a943505
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 39 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

# [16.0.0] - 2024-06-14
### updated to 0.66.0, removed dependancies to deprectated request, updated sock agent

# [15.1.11] - 2024-06-14
### added option for enabling test environment - [#380](https://github.com/windkh/node-red-contrib-telegrambot/issues/380)

Expand Down
46 changes: 23 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"bluebird": "^3.7.2",
"node-telegram-bot-api": "^0.66.0",
"socks-proxy-agent": "^7.0.0"
"socks-proxy-agent": "^8.0.3"
},
"scripts": {
"lint": "eslint telegrambot/*.js",
Expand Down
16 changes: 1 addition & 15 deletions telegrambot/99-telegrambot.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,23 +404,9 @@ module.exports = function (RED) {
if (error.message === 'ETELEGRAM: 401 Unauthorized') {
hint = 'Please check if the bot token is valid: ' + self.credentials.token;
stopPolling = true;
} else if (error.message.startsWith('EFATAL: Error: connect ETIMEDOUT')) {
hint = 'Timeout connecting to server. Maybe proxy blocked polling. Trying again.';
} else if (error.message.startsWith('EFATAL: Error: read ECONNRESET')) {
hint = 'Network connection may be down. Trying again.';
} else if (error.message.startsWith('EFATAL: Error: getaddrinfo EAI_AGAIN')) {
hint = 'Network connection may be down. Trying again.';
} else if (error.message.startsWith('EFATAL: Error: getaddrinfo ENOTFOUND')) {
hint = 'Network connection may be down. Trying again.';
} else if (error.message.startsWith('EFATAL: Error: SOCKS connection failed. Connection refused.')) {
hint = 'Username or password may be be wrong or connection is down. Aborting.';
} else if (error.message.startsWith('EFATAL: Error: Client network socket disconnected before secure TLS connection was established')) {
hint = 'Maybe SOCKS proxy refused connection.';
} else if (error.message.startsWith('EFATAL: Error: certificate has expired')) {
hint = 'Maybe SOCKS proxy refused connection.';
} else {
// unknown error occured... we simply ignore it.
hint = 'Unknown error. Trying again.';
hint = error.message + ' --> Trying again.';
}

if (stopPolling) {
Expand Down

0 comments on commit a943505

Please sign in to comment.