From 61f2419ba4c8017d6dce67d3eb8ac2e615b29f46 Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Sun, 27 Dec 2015 19:32:42 +0100 Subject: [PATCH] Fix #57 - check that we are using MULTIPLECONTACT mode while removing twitter contacts --- backends/twitter/TwitterPlugin.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backends/twitter/TwitterPlugin.cpp b/backends/twitter/TwitterPlugin.cpp index 573323e8..aea27f0a 100644 --- a/backends/twitter/TwitterPlugin.cpp +++ b/backends/twitter/TwitterPlugin.cpp @@ -305,6 +305,11 @@ void TwitterPlugin::handleBuddyRemovedRequest(const std::string &user, const std LOG4CXX_ERROR(logger, user << " is not connected to twitter!") return; } + + if (getTwitterMode(user) == MULTIPLECONTACT) { + LOG4CXX_ERROR(logger, user << " not removing Twitter contact " << buddyName << ", because the mode is not MULTIPLECONTACT") + return; + } LOG4CXX_INFO(logger, user << " - Removing Twitter contact " << buddyName) tp->runAsThread(new DestroyFriendRequest(userdb[user].sessions, user, buddyName,