Skip to content

Commit

Permalink
CST-12744 check Announce for Offer!
Browse files Browse the repository at this point in the history
  • Loading branch information
frabacche committed Nov 24, 2023
1 parent cd33c27 commit 5bb7551
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 5bb7551

Please sign in to comment.