Fix #57 - check that we are using MULTIPLECONTACT mode while removing twitter contacts

This commit is contained in:
Jan Kaluza 2015-12-27 19:32:42 +01:00
parent 5f0dc68407
commit 61f2419ba4

View file

@ -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,