From 282f3b873277dc18ddfbddc6a522dde386be2c6b Mon Sep 17 00:00:00 2001 From: benji7425 Date: Fri, 6 Jan 2017 22:09:17 +0000 Subject: [PATCH 1/3] Revert "Merged hotfix/reconnect-spam into master" This reverts commit c3630af9632faea94ededb225ef4105ba8f4cc8b. Decided not to do the whole 4-digit versioning thing. This should now be identical to v1.1.2 --- CHANGELOG.md | 6 ------ feed-bot.js | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27cec76..b242329 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,5 @@ # Changelog -## v1.1.2.1 - -### Fixed - -- Fixed reconnect timer being set to 0 sometimes - ## v1.1.2 ### Updated diff --git a/feed-bot.js b/feed-bot.js index 2cec21b..66f8a3c 100644 --- a/feed-bot.js +++ b/feed-bot.js @@ -50,7 +50,7 @@ var DiscordClient = { DiscordClient.reconnectInterval = setInterval(function () { DiscordClient.startup(); - }, Config.pollingInterval); + }, (Config.reconnectInterval || Config.pollingInterval)); }, onMessage: function (user, userID, channelID, message) { //check if the message is in the right channel, contains a link, and is not the latest link from the rss feed From 967b50f0069e7948d45de133dd03f5cf1c90e9db Mon Sep 17 00:00:00 2001 From: benji7425 Date: Sun, 8 Jan 2017 22:13:02 +0000 Subject: [PATCH 2/3] Fixed multiple users getting unsubscribed when one user unsubscribes --- feed-bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feed-bot.js b/feed-bot.js index e9618c9..e9e580b 100644 --- a/feed-bot.js +++ b/feed-bot.js @@ -161,7 +161,7 @@ var Subscriptions = { }, unsubscribe: function (channelID, userID, user) { if (this.subscribers.indexOf(userID) > -1) { - this.subscribers.splice(this.subscribers.indexOf(userID)); + this.subscribers.splice(this.subscribers.indexOf(userID), 1); this.writeToFile(); Log.event("Unsubscribed user " + (user ? user + "(" + userID + ")" : userID)); From 071a579f450d2f1541c831628f78f0f24529af54 Mon Sep 17 00:00:00 2001 From: benji7425 Date: Sun, 8 Jan 2017 22:13:38 +0000 Subject: [PATCH 3/3] Updated changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 047bf71..e310bf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v1.2.1 + +### Fixed + +- Fixed multiple users being unsubscribed when one user unsubscribes + ## v1.2.0 ### Added