Skip to content

Commit 0ed897e

Browse files
committed
CLAP-431 Feat : 알림 수신자 검증 로직 추가
1 parent 8be4f9c commit 0ed897e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/clap/server/application/service/task/ApprovalTaskService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
import org.springframework.transaction.annotation.Transactional;
2727

2828
import java.util.List;
29+
import java.util.stream.Collectors;
30+
import java.util.stream.Stream;
2931

3032
@ApplicationService
3133
@RequiredArgsConstructor
@@ -59,7 +61,9 @@ public ApprovalTaskResponse approvalTaskByReviewer(Long reviewerId, Long taskId,
5961
TaskHistory taskHistory = TaskHistory.createTaskHistory(TaskHistoryType.PROCESSOR_ASSIGNED, task, null, processor, null);
6062
commandTaskHistoryPort.save(taskHistory);
6163

62-
List<Member> receivers = List.of(task.getRequester(), processor);
64+
List<Member> receivers = Stream.of(task.getRequester(), processor)
65+
.distinct()
66+
.collect(Collectors.toList());
6367
String processorName = processor.getNickname();
6468
publishNotification(receivers, task, processorName);
6569

0 commit comments

Comments
 (0)