Skip to content

Commit

Permalink
Feat: Add default user avatar when hover on reciever user name - MEED…
Browse files Browse the repository at this point in the history
…-3111 - Meeds-io/MIPs#83 (#457)

This change adds the user enabled property in identity-popover directive for kudos message, this property allows to display the new default user avatar instead of the old one.

(cherry picked from commit 0d05745)
  • Loading branch information
SaraBoutej committed Jan 22, 2024
1 parent 272db3a commit 74f9489
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public class Kudos implements Serializable {

private boolean externalReceiver;

private boolean enabledReceiver;

private String message;

private long timeInSeconds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ public static Kudos fromEntity(KudosEntity kudosEntity) {
kudos.setExternalReceiver(receiverIdentity.getProfile() != null
&& receiverIdentity.getProfile().getProperty("external") != null
&& receiverIdentity.getProfile().getProperty("external").equals("true"));
kudos.setEnabledReceiver(receiverIdentity.isEnable() && !receiverIdentity.isDeleted());
kudos.setReceiverFullName(receiverIdentity.getProfile().getFullName());
kudos.setReceiverURL(LinkProvider.getUserProfileUri(receiverIdentity.getRemoteId()));
kudos.setReceiverAvatar(getAvatar(receiverIdentity, null));
Expand Down
3 changes: 2 additions & 1 deletion kudos-webapps/src/main/webapp/vue-app/js/Kudos.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ export function registerActivityActionExtension() {
'avatar': kudos.receiverAvatar,
'position': kudos.receiverPosition,
'external': String(kudos.externalReceiver),
'enabled': String(kudos.enabledReceiver),
};
return {
key: 'NewKudosSentActivityComment.activity_kudos_title',
Expand Down Expand Up @@ -425,4 +426,4 @@ export function registerActivityActionExtension() {
}
}
});
}
}

0 comments on commit 74f9489

Please sign in to comment.