/**
* @return String username for given <code>targetID</code>
*/
public static String getUsernameFromID(ID targetID) {
IChatID chatID = (IChatID) targetID.getAdapter(IChatID.class);
if (chatID != null)
return chatID.getUsername();
try {
URI uri = new URI(targetID.getName());
String user = uri.getUserInfo();
return user == null ? targetID.getName() : user;
} catch (URISyntaxException e) {