Changeset - 922168855bdf
[Not reviewed]
0 3 0
Sarang Bharadwaj - 13 years ago 2012-07-02 19:17:32
sarang.bh@gmail.com
Added response messages like "Status update successful"
3 files changed with 10 insertions and 8 deletions:
0 comments (0 inline, 0 general)
backends/twitter/Requests/OAuthFlow.cpp
Show inline comments
 
@@ -12,7 +12,7 @@ void OAuthFlow::finalize()
 
		np->handleLogoutRequest(user, username);
 
	} else {
 
		np->handleMessage(user, "twitter-account", std::string("Please visit the following link and authorize this application: ") + authUrl);
 
		np->handleMessage(user, "twitter-account", std::string("Please reply with the PIN provided by twitter. Prefix the pin with 'pin:'. Ex. 'pin: 1234'"));
 
		np->handleMessage(user, "twitter-account", std::string("Please reply with the PIN provided by twitter. Prefix the pin with '#pin'. Ex. '#pin 1234'"));
 
		np->OAuthFlowComplete(user, twitObj);
 
	}	
 
}
backends/twitter/Requests/StatusUpdateRequest.cpp
Show inline comments
 
@@ -20,11 +20,8 @@ void StatusUpdateRequest::finalize()
 
		callBack(user, replyMsg);
 
	} else {
 
		std::string error = getErrorMessage(replyMsg);
 
		if(error.length()) {
 
			LOG4CXX_ERROR(logger, user << ": " << error);
 
			callBack(user, error);
 
		}
 
		if(error.length()) LOG4CXX_ERROR(logger, user << ": " << error)
 
		else LOG4CXX_INFO(logger, "Updated status for " << user << ": " << data);
 
		callBack(user, error);
 
	}
 
	return;
 
}
backends/twitter/TwitterPlugin.cpp
Show inline comments
 
@@ -406,6 +406,8 @@ void TwitterPlugin::statusUpdateResponse(std::string &user, std::string &errMsg)
 
{
 
	if(errMsg.length()) {
 
		handleMessage(user, adminLegacyName, errMsg, adminNickName);
 
	} else {
 
		handleMessage(user, adminLegacyName, "Status Update successful", adminNickName);
 
	}
 
}
 

	
 
@@ -514,6 +516,7 @@ void TwitterPlugin::createFriendResponse(std::string &user, std::string &frnd, s
 
	if(twitterMode == SINGLECONTACT) {
 
		handleMessage(user, adminLegacyName, std::string("You are now following ") + frnd, adminNickName);
 
	} else if(twitterMode == MULTIPLECONTACT) {
 
		handleMessage(user, adminLegacyName, std::string("You are now following ") + frnd, adminNickName);
 
		handleBuddyChanged(user, frnd, frnd, std::vector<std::string>(), pbnetwork::STATUS_ONLINE);
 
	}
 
}
 
@@ -524,8 +527,9 @@ void TwitterPlugin::deleteFriendResponse(std::string &user, std::string &frnd, s
 
		handleMessage(user, adminLegacyName, errMsg, adminNickName);
 
		return;
 
	} if(twitterMode == SINGLECONTACT) {
 
		handleMessage(user, adminLegacyName, std::string("You are not following ") + frnd + "anymore", adminNickName);
 
		handleMessage(user, adminLegacyName, std::string("You are not following ") + frnd + " anymore", adminNickName);
 
	} else if(twitterMode == MULTIPLECONTACT) {
 
		handleMessage(user, adminLegacyName, std::string("You are not following ") + frnd + " anymore", adminNickName);
 
		handleBuddyRemoved(user, frnd);
 
	}
 
}
 
@@ -535,6 +539,7 @@ void TwitterPlugin::RetweetResponse(std::string &user, std::string &errMsg)
 
{
 
	if(errMsg.length()) {
 
		handleMessage(user, adminLegacyName, errMsg, adminNickName);
 
		return;
 
	} else {
 
		handleMessage(user, adminLegacyName, "Retweet successful", adminNickName);
 
	}
 
}
0 comments (0 inline, 0 general)