From 59194bbd38ae463ffa9545319926459689bdbf8a Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Sat, 2 Jan 2016 19:48:52 +0100 Subject: [PATCH] Set default type of user settings in Twitter --- backends/twitter/TwitterPlugin.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backends/twitter/TwitterPlugin.cpp b/backends/twitter/TwitterPlugin.cpp index aea27f0a..f841b83e 100644 --- a/backends/twitter/TwitterPlugin.cpp +++ b/backends/twitter/TwitterPlugin.cpp @@ -247,7 +247,7 @@ void TwitterPlugin::handleMessageSendRequest(const std::string &user, const std: if((mode)m == userdb[user].twitterMode) return; //If same as current mode return if(m < 0 || m > 2) { // Invalid modes - handleMessage(user, adminLegacyName, std::string("Error! Unknown mode ") + data + ". Allowed values 0,1,2." ); + handleMessage(user, adminLegacyName, std::string("Error! Unknown mode ") + data + ". Allowed values 0 or 1." ); return; } @@ -372,7 +372,7 @@ bool TwitterPlugin::getUserOAuthKeyAndSecret(const std::string user, std::string return false; } - key="", secret=""; int type; + key="", secret=""; int type = TYPE_STRING;; storagebackend->getUserSetting((long)info.id, OAUTH_KEY, type, key); storagebackend->getUserSetting((long)info.id, OAUTH_SECRET, type, secret); return true; @@ -389,7 +389,7 @@ bool TwitterPlugin::checkSpectrum1User(const std::string user) } std::string first_synchronization_done = ""; - int type; + int type = TYPE_STRING; storagebackend->getUserSetting((long)info.id, "first_synchronization_done", type, first_synchronization_done); LOG4CXX_INFO(logger, "first_synchronization_done: " << first_synchronization_done) @@ -408,7 +408,7 @@ int TwitterPlugin::getTwitterMode(const std::string user) return -1; } - int type; int m; + int type = TYPE_STRING; int m; std::string s_m; storagebackend->getUserSetting((long)info.id, MODE, type, s_m); if(s_m == "") { @@ -552,7 +552,7 @@ std::string TwitterPlugin::getMostRecentTweetIDUnsafe(const std::string user) if(onlineUsers.count(user)) { ID = userdb[user].mostRecentTweetID; if (ID.empty()) { - int type; + int type = TYPE_STRING; UserInfo info; if(storagebackend->getUser(user, info) == false) { LOG4CXX_ERROR(logger, "Didn't find entry for " << user << " in the database!") @@ -590,7 +590,7 @@ std::string TwitterPlugin::getMostRecentDMIDUnsafe(const std::string user) { if(onlineUsers.count(user)) { ID = userdb[user].mostRecentDirectMessageID; if (ID.empty()) { - int type; + int type = TYPE_STRING; UserInfo info; if(storagebackend->getUser(user, info) == false) { LOG4CXX_ERROR(logger, "Didn't find entry for " << user << " in the database!")