This commit is contained in:
Massimiliano Assante 2016-05-18 22:18:12 +00:00
parent 166d3dc509
commit dc40562897
1 changed files with 3 additions and 2 deletions

View File

@ -21,6 +21,7 @@ import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.application.framework.core.session.SessionManager; import org.gcube.application.framework.core.session.SessionManager;
import org.gcube.applicationsupportlayer.social.ApplicationNotificationsManager; import org.gcube.applicationsupportlayer.social.ApplicationNotificationsManager;
import org.gcube.applicationsupportlayer.social.NotificationsManager; import org.gcube.applicationsupportlayer.social.NotificationsManager;
import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingSite;
import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingUser; import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingUser;
import org.gcube.common.portal.GCubePortalConstants; import org.gcube.common.portal.GCubePortalConstants;
import org.gcube.common.portal.PortalContext; import org.gcube.common.portal.PortalContext;
@ -664,7 +665,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
//if the user who liked this post is not the user who posted it notify the poster user (Feed owner) //if the user who liked this post is not the user who posted it notify the poster user (Feed owner)
if (! user.getUsername().equals(feedOwnerId)) { if (! user.getUsername().equals(feedOwnerId)) {
NotificationsManager nm = new ApplicationNotificationsManager( NotificationsManager nm = new ApplicationNotificationsManager(
getThreadLocalRequest(), new SocialNetworkingSite(getThreadLocalRequest()),
getASLSession().getScopeName(), getASLSession().getScopeName(),
new SocialNetworkingUser(username, user.getEmailaddress(), user.getFullName(), user.getAvatarId()), new SocialNetworkingUser(username, user.getEmailaddress(), user.getFullName(), user.getAvatarId()),
APP_ID); APP_ID);
@ -734,7 +735,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
if (commentCommitResult && isWithinPortal()) { if (commentCommitResult && isWithinPortal()) {
//if the user who commented this post is not the user who posted it notify the poster user (Feed owner) //if the user who commented this post is not the user who posted it notify the poster user (Feed owner)
NotificationsManager nm = new ApplicationNotificationsManager( NotificationsManager nm = new ApplicationNotificationsManager(
getThreadLocalRequest(), new SocialNetworkingSite(getThreadLocalRequest()),
getASLSession().getScopeName(), getASLSession().getScopeName(),
new SocialNetworkingUser(user.getUsername(), user.getEmailaddress(), user.getFullName(), user.getAvatarId()), new SocialNetworkingUser(user.getUsername(), user.getEmailaddress(), user.getFullName(), user.getAvatarId()),
APP_ID); APP_ID);