Don't print "null" on empty first/last/username

This commit is contained in:
Mark Vainomaa 2016-10-11 21:06:49 +03:00
parent aeb257b04c
commit 99ab35ee9f
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ public class Utils {
String fn = user.getFirstName();
String ln = user.getLastName();
String un = user.getUserName();
return String.format("%s %s (%s)", fn, ln, un);
return String.format("%s %s (%s)", fn!=null?fn:"", ln!=null?ln:"", un!=null?un:"");
}
private static String getMessageType(Message message){
if(message.getSticker() != null){