diff --git a/content-service/src/main/java/io/meeds/news/notification/provider/MailTemplateProvider.java b/content-service/src/main/java/io/meeds/news/notification/provider/MailTemplateProvider.java index 1f80c1ec1..ba3c331a6 100644 --- a/content-service/src/main/java/io/meeds/news/notification/provider/MailTemplateProvider.java +++ b/content-service/src/main/java/io/meeds/news/notification/provider/MailTemplateProvider.java @@ -111,8 +111,7 @@ protected MessageInfo makeMessage(NotificationContext ctx) { templateContext.put("AUTHOR_AVATAR_URL", encoder.encode(authorAvatarUrl)); templateContext.put("CONTEXT", encoder.encode(context)); StringBuilder activityUrl = new StringBuilder(); - Space space = spaceService.getSpaceByDisplayName(contentSpaceName); - if (pluginId.equals(PublishNewsNotificationPlugin.ID) && !spaceService.isMember(space, notification.getTo())) { + if (pluginId.equals(PublishNewsNotificationPlugin.ID)) { String portalName = PortalContainer.getCurrentPortalContainerName(); String portalOwner = CommonsUtils.getCurrentPortalOwner(); String currentDomain = CommonsUtils.getCurrentDomain(); diff --git a/content-service/src/test/java/io/meeds/news/notification/provider/MailTemplateProviderTest.java b/content-service/src/test/java/io/meeds/news/notification/provider/MailTemplateProviderTest.java index 62edf4edf..4dbcff7b3 100644 --- a/content-service/src/test/java/io/meeds/news/notification/provider/MailTemplateProviderTest.java +++ b/content-service/src/test/java/io/meeds/news/notification/provider/MailTemplateProviderTest.java @@ -153,7 +153,6 @@ public void shouldInstantiateMailTemplate() { when(encoder.encode("jean")).thenReturn("jean"); when(encoder.encode("http://localhost:8080/content/images/newsImageDefault.png")).thenReturn("http://localhost:8080/content/images/newsImageDefault.png"); when(encoder.encode("COMMENT MY NEWS")).thenReturn("COMMENT MY NEWS"); - when(encoder.encode("http://localhost:8080/portal/intranet/activity?id=39")).thenReturn("http://localhost:8080/portal/intranet/activity?id=39"); when(notification.getValueOwnerParameter("read")).thenReturn("true"); when(notification.getId()).thenReturn("NotifId123"); Date date = new Date();