Changeset - 13a6896ce18d
[Not reviewed]
0 1 0
HanzZ - 14 years ago 2011-08-16 23:16:52
hanzz.k@gmail.com
vcard tweaking
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
backends/libpurple/main.cpp
Show inline comments
 
@@ -891,12 +891,15 @@ static void *notify_user_info(PurpleConnection *gc, const char *who, PurpleNotif
 
				LOG4CXX_WARN(logger, "Unhandled VCard Label '" << purple_notify_user_info_entry_get_label(vcardEntry) << "' " << purple_notify_user_info_entry_get_value(vcardEntry));
 
			}
 
		}
 
		vcardEntries = vcardEntries->next;
 
	}
 

	
 
	if ((!firstName.empty() || !lastName.empty()) && fullName.empty())
 
		fullName = firstName + " " + lastName;
 

	
 
	if (nickname.empty() && !fullName.empty()) {
 
		nickname = fullName;
 
	}
 

	
 
	bool ownInfo = name == purple_account_get_username(account);
 
	std::cout << "RECEIVED " << name << " " << purple_account_get_username(account) << "\n";
 
@@ -920,15 +923,12 @@ static void *notify_user_info(PurpleConnection *gc, const char *who, PurpleNotif
 
				photo = Swift::createByteArray(data, len);
 
			}
 
			purple_imgstore_unref(avatar);
 
		}
 
	}
 

	
 
	if ((!firstName.empty() || !lastName.empty()) && fullName.empty())
 
		fullName = firstName + " " + lastName;
 

	
 
	PurpleBuddy *buddy = purple_find_buddy(purple_connection_get_account(gc), who);
 
	if (buddy && photo.size() == 0) {
 
		gsize len;
 
		PurpleBuddyIcon *icon = NULL;
 
		icon = purple_buddy_icons_find(purple_connection_get_account(gc), name.c_str());
 
		if (icon) {
0 comments (0 inline, 0 general)