Added response messages like "Status update successful"
This commit is contained in:
parent
7166b46284
commit
922168855b
3 changed files with 10 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue