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 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));