|
|
|
@ -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());
|
|
|
|
|