From 5bb75512b03b2c029b52fda9d13577a063596236 Mon Sep 17 00:00:00 2001 From: frabacche Date: Fri, 24 Nov 2023 10:38:09 +0100 Subject: [PATCH] CST-12744 check Announce for Offer! --- .../dspace/app/ldn/service/impl/LDNMessageServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dspace-api/src/main/java/org/dspace/app/ldn/service/impl/LDNMessageServiceImpl.java b/dspace-api/src/main/java/org/dspace/app/ldn/service/impl/LDNMessageServiceImpl.java index 88fdbbb491ee..8084e6b6d8a2 100644 --- a/dspace-api/src/main/java/org/dspace/app/ldn/service/impl/LDNMessageServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/app/ldn/service/impl/LDNMessageServiceImpl.java @@ -294,12 +294,13 @@ public NotifyRequestStatus findRequestsByItem(Context context, Item item) throws offer.setServiceName(msg.getTarget().getName()); offer.setServiceUrl(msg.getTarget().getLdnUrl()); List 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()