r7941 - /trunk/jabber/src/vcard.cpp

[email protected]
Newsgroups gmane.network.licq.cvs
Message-ID <20101022051241.8C284224B80@thejon>
Author: erijo
Date: Fri Oct 22 14:12:33 2010
New Revision: 7941

Log:
Use full name as a fallback for alias in case nickname isn't set

Modified:
    trunk/jabber/src/vcard.cpp

Modified: trunk/jabber/src/vcard.cpp
==============================================================================
--- trunk/jabber/src/vcard.cpp (original)
+++ trunk/jabber/src/vcard.cpp Fri Oct 22 14:12:33 2010
@@ -61,8 +61,13 @@
 
 bool VCardToUser::updateUser(Licq::User* user) const
 {
-  if (!user->KeepAliasOnUpdate() && !myVCard->nickname().empty())
-    user->setAlias(myVCard->nickname());
+  if (!user->KeepAliasOnUpdate())
+  {
+    if (!myVCard->nickname().empty())
+      user->setAlias(myVCard->nickname());
+    else if (!myVCard->formattedname().empty())
+      user->setAlias(myVCard->formattedname());
+  }
 
   const gloox::VCard::Name& name = myVCard->name();
   user->setUserInfoString("FirstName", name.given);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.