Skip to content

Commit

Permalink
S2U-42 SAK-49311 Cannot change / add profile photo (#11958)
Browse files Browse the repository at this point in the history
  • Loading branch information
stetsche authored and Miguel Pellicer committed Dec 12, 2023
1 parent 4f11d91 commit bc9b0f3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public class ProfileImage {
private String altText;
private String mimeType;
private boolean isDefault;
private boolean isInitials;

/**
* Get access to the binary data from either the uploaded image or the base64 encoded data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1116,8 +1116,9 @@ public ProfileImage getProfileAvatarInitials(String userUuid) {
image.setUploadedImage(bytes);
} else {
image.setExternalImageUrl(getUnavailableImageURL());
image.setDefault(true);
}
image.setDefault(true);
image.setInitials(true);
cache.put(userUuid, image);
}
return image;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,6 @@ private Boolean hasDefaultImage(String userId, String siteId, boolean official)
profileImage = profileImageLogic.getProfileImage(userId, null, null, ProfileConstants.PROFILE_IMAGE_MAIN, siteId);
}

return profileImage.isDefault();
return profileImage.isDefault() || profileImage.isInitials();
}
}

0 comments on commit bc9b0f3

Please sign in to comment.