From 9e439c839b698178958a5c7680d916a8a9f49b6d Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Mon, 22 Jul 2019 15:24:10 +0000 Subject: [PATCH] bug fix #17269, SocialNetworking service passes wrong email sender in email notifications git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/branches/portal/social-networking-library-ws/2.2@181290 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 2 +- .settings/org.eclipse.wst.common.component | 10 +++++----- distro/changelog.xml | 5 +++++ pom.xml | 2 +- .../networking/caches/SocialNetworkingSiteFinder.java | 1 + 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.classpath b/.classpath index 522d72e..165f1c5 100644 --- a/.classpath +++ b/.classpath @@ -27,7 +27,7 @@ - + diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index bc5c1fe..c6e3acb 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -7,22 +7,22 @@ uses + + uses + uses uses - - uses - - + uses uses - + uses diff --git a/distro/changelog.xml b/distro/changelog.xml index 222c1f5..f194ff0 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,4 +1,9 @@ + + bug fix #17269, SocialNetworking service passes wrong email sender in email notifications + diff --git a/pom.xml b/pom.xml index 5b12ed3..5b7ad1a 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ org.gcube.portal social-networking-library-ws war - 2.2.3-SNAPSHOT + 2.2.4-SNAPSHOT social-networking-library-ws Rest interface for the social networking library. diff --git a/src/main/java/org/gcube/portal/social/networking/caches/SocialNetworkingSiteFinder.java b/src/main/java/org/gcube/portal/social/networking/caches/SocialNetworkingSiteFinder.java index 1e88ff7..c815f1e 100644 --- a/src/main/java/org/gcube/portal/social/networking/caches/SocialNetworkingSiteFinder.java +++ b/src/main/java/org/gcube/portal/social/networking/caches/SocialNetworkingSiteFinder.java @@ -193,6 +193,7 @@ public class SocialNetworkingSiteFinder { }else{ String siteName = matchingGateway.getGroupName(); String emailSender = (String)groupManager.readCustomAttr(matchingGateway.getGroupId(), EMAIL_SENDER_SITE_CUSTOM_FIELD); + emailSender = emailSender.replace("\"", ""); //this is because otherwise it would contains double quotes and postfix would use it as first part before @ e.g. senderEmail="aginfra@d4science.org"@d4science.org String siteLandingPagePath = GCubePortalConstants.PREFIX_GROUP_URL + matchingGateway.getFriendlyURL(); String siteUrl = discoverHostOfServiceEndpoint(siteName); SocialNetworkingSite site = new SocialNetworkingSite(siteName, emailSender, siteUrl, siteLandingPagePath);