Skip to content

Commit 29634b9

Browse files
committed
Automatically approve private kudos.
1 parent bb8ade1 commit 29634b9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server/src/main/java/com/objectcomputing/checkins/services/kudos/KudosServicesImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ public Kudos save(KudosCreateDTO kudosDTO) {
118118
kudosRecipientServices.save(kudosRecipient);
119119
}
120120

121+
if (!savedKudos.getPubliclyVisible()) {
122+
// Private kudos do not need to be approved by another party.
123+
savedKudos.setDateApproved(LocalDate.now());
124+
savedKudos = kudosRepository.update(savedKudos);
125+
}
126+
121127
sendNotification(savedKudos, NotificationType.creation);
122128
return savedKudos;
123129
}

0 commit comments

Comments
 (0)