From 61f2419ba4c8017d6dce67d3eb8ac2e615b29f46 2015-12-27 19:32:42 From: Jan Kaluza Date: 2015-12-27 19:32:42 Subject: [PATCH] Fix #57 - check that we are using MULTIPLECONTACT mode while removing twitter contacts --- diff --git a/backends/twitter/TwitterPlugin.cpp b/backends/twitter/TwitterPlugin.cpp index 573323e8df0bcee01d39de2ce7ad6e16065aea5a..aea27f0af007c7f91fc1e4614fa2a61b712bd901 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,