Changeset - a06b8a919721
[Not reviewed]
0 1 0
vitalyster - 9 years ago 2016-05-25 02:31:00
vitalyster@gmail.com
libpurple: fix oauth sender
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
backends/libpurple/main.cpp
Show inline comments
 
@@ -328,12 +328,16 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
 

	
 
			if (password.empty() && protocol != "prpl-telegram" && protocol != "prpl-hangouts") {
 
				LOG4CXX_INFO(logger,  name.c_str() << ": Empty password");
 
				np->handleDisconnected(user, 1, "Empty password.");
 
				return;
 
			}
 
			if (protocol == "prpl-hangouts") {
 
			        adminLegacyName = "hangouts";
 
			        adminAlias = "hangouts";
 
			}
 

	
 
			if (!purple_find_prpl_wrapped(protocol.c_str())) {
 
				LOG4CXX_INFO(logger,  name.c_str() << ": Invalid protocol '" << protocol << "'");
 
				np->handleDisconnected(user, 1, "Invalid protocol " + protocol);
 
				return;
 
			}
 
@@ -379,14 +383,12 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
 
			const PurpleStatusType *status_type = purple_account_get_status_type_with_primitive_wrapped(account, PURPLE_STATUS_AVAILABLE);
 
			if (status_type != NULL) {
 
				purple_account_set_status_wrapped(account, purple_status_type_get_id_wrapped(status_type), TRUE, NULL);
 
			}
 
			// OAuth helper
 
			if (protocol == "prpl-hangouts") {
 
				adminLegacyName = "hangouts";
 
				adminAlias = "hangouts";
 
				LOG4CXX_INFO(logger, user << ": Adding Buddy " << adminLegacyName << " " << adminAlias)
 
				handleBuddyChanged(user, adminLegacyName, adminAlias, std::vector<std::string>(), pbnetwork::STATUS_ONLINE);
 
			}
 
		}
 

	
 
		void handleLogoutRequest(const std::string &user, const std::string &legacyName) {
0 comments (0 inline, 0 general)