From b35c7de7025fd49ce61b08c0d114449a590ba3d9 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Thu, 19 May 2016 09:32:09 +0000 Subject: [PATCH] seems working git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-mail-servlet@128679 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../java/org/gcube/portal/socialmail/PeriodicTask.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/portal/socialmail/PeriodicTask.java b/src/main/java/org/gcube/portal/socialmail/PeriodicTask.java index 2126e01..af59c04 100644 --- a/src/main/java/org/gcube/portal/socialmail/PeriodicTask.java +++ b/src/main/java/org/gcube/portal/socialmail/PeriodicTask.java @@ -66,6 +66,7 @@ import com.sun.mail.util.MailSSLSocketFactory; */ public class PeriodicTask implements Runnable { private static final Logger _log = LoggerFactory.getLogger(PeriodicTask.class); + private static final String APP_ID_NEWSFEED = "org.gcube.portlets.user.newsfeed.server.NewsServiceImpl"; private DatabookStore socialStore; private EmailPopAccount popAccount; @@ -378,7 +379,8 @@ public class PeriodicTask implements Runnable { NotificationsManager nm = new ApplicationNotificationsManager( site, fakeSession.getScope(), - new SocialNetworkingUser(fakeSession.getUsername(), fakeSession.getUserEmailAddress(), fakeSession.getUserFullName(), fakeSession.getUserAvatarId()) + new SocialNetworkingUser(fakeSession.getUsername(), fakeSession.getUserEmailAddress(), fakeSession.getUserFullName(), fakeSession.getUserAvatarId()), + APP_ID_NEWSFEED ); if (! fakeSession.getUsername().equals(feedOwnerId) && (!isAppFeed)) { boolean result = nm.notifyLikedFeed(feedOwnerId, feedId, ""); @@ -408,8 +410,9 @@ public class PeriodicTask implements Runnable { //if the user who commented this post is not the user who posted it notifies the poster user (Feed owner) NotificationsManager nm = new ApplicationNotificationsManager( site, - fakeSession.getScope(), - new SocialNetworkingUser(fakeSession.getUsername(), fakeSession.getUserEmailAddress(), fakeSession.getUserFullName(), fakeSession.getUserAvatarId()) + feed.getVreid(), + new SocialNetworkingUser(fakeSession.getUsername(), fakeSession.getUserEmailAddress(), fakeSession.getUserFullName(), fakeSession.getUserAvatarId()), + APP_ID_NEWSFEED ); if (! fakeSession.getUsername().equals(feedOwnerId) && (!isAppFeed)) { boolean result = nm.notifyOwnCommentReply(feedOwnerId, feedId, commentText, comment.getKey());