use of net.sf.kraken.roster.TransportBuddy in project Openfire by igniterealtime.
the class OSCARSession method updateRosterNickname.
/**
* Updates roster nickname information about a contact.
*
* @param sn Screenname/UIN of contact
* @param nickname New nickname
*/
public void updateRosterNickname(String sn, String nickname) {
try {
TransportBuddy buddy = getBuddyManager().getBuddy(getTransport().convertIDToJID(sn));
buddy.setNickname(nickname);
try {
getTransport().addOrUpdateRosterItem(getJID(), buddy.getName(), buddy.getNickname(), buddy.getGroups());
} catch (UserNotFoundException e) {
// Can't update something that's not really in our list.
}
} catch (NotFoundException e) {
// Can't update something that's not really in our list.
}
}
Aggregations