Overwrite nickname in vcard only if it is not set yet

This commit is contained in:
HanzZ 2011-08-16 21:55:45 +02:00
parent b2fd4a4563
commit f9b712391e

View file

@ -894,6 +894,10 @@ static void *notify_user_info(PurpleConnection *gc, const char *who, PurpleNotif
vcardEntries = vcardEntries->next;
}
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";
@ -903,7 +907,7 @@ static void *notify_user_info(PurpleConnection *gc, const char *who, PurpleNotif
displayname = purple_account_get_name_for_display(account);
}
if (displayname) {
if (displayname && nickname.empty()) {
nickname = displayname;
}