Fix getNotificationRequestPreview
This commit is contained in:
parent
7b6f3ed4df
commit
d2912af543
@ -251,9 +251,12 @@ public class NotificationController extends BaseController {
|
|||||||
preview.setRecipientsCountByTarget(recipientsCountByTarget);
|
preview.setRecipientsCountByTarget(recipientsCountByTarget);
|
||||||
preview.setTotalRecipientsCount(recipientsCountByTarget.values().stream().mapToInt(Integer::intValue).sum());
|
preview.setTotalRecipientsCount(recipientsCountByTarget.values().stream().mapToInt(Integer::intValue).sum());
|
||||||
|
|
||||||
|
Set<NotificationDeliveryMethod> deliveryMethods = template.getConfiguration().getDeliveryMethodsTemplates().entrySet()
|
||||||
|
.stream().filter(entry -> entry.getValue().isEnabled()).map(Map.Entry::getKey).collect(Collectors.toSet());
|
||||||
NotificationProcessingContext ctx = NotificationProcessingContext.builder()
|
NotificationProcessingContext ctx = NotificationProcessingContext.builder()
|
||||||
.tenantId(user.getTenantId())
|
.tenantId(user.getTenantId())
|
||||||
.request(request)
|
.request(request)
|
||||||
|
.deliveryMethods(deliveryMethods)
|
||||||
.template(template)
|
.template(template)
|
||||||
.settings(null)
|
.settings(null)
|
||||||
.build();
|
.build();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user