powered by Jive Software

SubscriptionDialog.java - Getting nickname


When a user adds another user the subscription request that is sent will pop-up with a nickname just containing the jabber id. (Running LDAP and AD-integrated). I would like to pick upp the Vcard nick-name and use it instead. I have been trying to get it to work by adding the code below, but i just causes the Subscription dialog to not appear… I would be very greatful if anyone could help me.

String nickname = SparkManager.getVCardManager().getVCard(jid).getNickName();


**if ( nickname == null){
nickname = “”;


Single stepping the code will abort as soon as it gets to the line where getVCard is involved…

I am not very experienced in writing java, but in C/C++ so it could just be lack of understanding…


I will answere my own question… There seems to be a problem when using the nickname. I have changed the code to use fn and ln instead and it works.

In the function invoke I have changed the code for setting the nicknameField to the below.

** String fn = SparkManager.getVCardManager().getVCard(jid).getFirstName();
if (fn == null) {
String ln = SparkManager.getVCardManager().getVCard(jid).getLastName();
if (ln == null) {
String nickname = fn + ’ ’ + ln;