[fix] load default picture link if not present
@@ -64,8 +64,12 @@ public class CorpUserUtil {
UserEntity user = new UserEntity();
user.setCategory("person");
user.setLabel(corpUser.getUsername());
+ if (corpUser.hasInfo()) {
user.setDisplayName(corpUser.getInfo().getDisplayName());
+ }
+ if (corpUser.hasEditableInfo() && corpUser.getEditableInfo().hasPictureLink()) {
user.setPictureLink(corpUser.getEditableInfo().getPictureLink().toString());
+ }
return user;
}
}
\ No newline at end of file
