From 967b50f0069e7948d45de133dd03f5cf1c90e9db Mon Sep 17 00:00:00 2001 From: benji7425 Date: Sun, 8 Jan 2017 22:13:02 +0000 Subject: [PATCH] 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));