Skip to content

Commit

Permalink
Merged in coar-notify-7_CST-12744 (pull request DSpace#1347)
Browse files Browse the repository at this point in the history
CST-12744 check Announce for Offer!
  • Loading branch information
frabacche committed Nov 24, 2023
2 parents 38b7be5 + 5bb7551 commit 062b9ae
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,13 @@ public NotifyRequestStatus findRequestsByItem(Context context, Item item) throws
offer.setServiceName(msg.getTarget().getName());
offer.setServiceUrl(msg.getTarget().getLdnUrl());
List<LDNMessageEntity> acks = ldnMessageDao.findAllRelatedMessagesByItem(
context, msg, item, "Accept", "TentativeReject", "TentativeAccept");
context, msg, item, "Accept", "TentativeReject", "TentativeAccept", "Announce");
if (acks == null || acks.isEmpty()) {
offer.setStatus(NotifyRequestStatusEnum.REQUESTED);
} else if (acks.stream()
.filter(c -> (c.getActivityStreamType().equalsIgnoreCase("TentativeAccept") ||
c.getActivityStreamType().equalsIgnoreCase("Accept")))
c.getActivityStreamType().equalsIgnoreCase("Accept") ||
c.getActivityStreamType().equalsIgnoreCase("Announce")))
.findAny().isPresent()) {
offer.setStatus(NotifyRequestStatusEnum.ACCEPTED);
} else if (acks.stream()
Expand Down

0 comments on commit 062b9ae

Please sign in to comment.