Discussion is now reported in email's body, upgraded deprecated methods of asl social
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-mail-servlet@124599 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ccb89a4a27
commit
32fa994fa6
|
@ -1,9 +1,10 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portal.social-mail-servlet.1-3-1"
|
||||
<Changeset component="org.gcube.portal.social-mail-servlet.1-4-0"
|
||||
date="2016-02-29">
|
||||
<Change>Discussion is now reported in email's body</Change>
|
||||
<Change>Upgraded deprecated methods of asl social</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portal.social-mail-servlet.1-3-0"
|
||||
<Changeset component="org.gcube.portal.social-mail-servlet.1-3-0"
|
||||
date="2015-12-11">
|
||||
<Change>Removed the part the export users to LDAP</Change>
|
||||
</Changeset>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
|||
<groupId>org.gcube.portal</groupId>
|
||||
<artifactId>social-mail-servlet</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.3.1-SNAPSHOT</version>
|
||||
<version>1.4.0-SNAPSHOT</version>
|
||||
|
||||
<name>social-mail-servlet Webapp</name>
|
||||
<description>This component read periodically email replies from user wanting to reply to a post via email</description>
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.gcube.applicationsupportlayer.social.ApplicationNotificationsManager;
|
|||
import org.gcube.applicationsupportlayer.social.NotificationsManager;
|
||||
import org.gcube.applicationsupportlayer.social.mailing.AppType;
|
||||
import org.gcube.applicationsupportlayer.social.mailing.EmailPlugin;
|
||||
import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingUser;
|
||||
import org.gcube.common.homelibrary.home.HomeLibrary;
|
||||
import org.gcube.common.homelibrary.home.exceptions.HomeNotFoundException;
|
||||
import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
|
||||
|
@ -265,7 +266,11 @@ public class PeriodicTask implements Runnable {
|
|||
if (newMessageId != null) {
|
||||
_log.debug("Sending message notifications ... ");
|
||||
List<GenericItemBean> recipients = getUsersbyUserId(recipientIds);
|
||||
NotificationsManager nm = new ApplicationNotificationsManager(fakeSession);
|
||||
|
||||
NotificationsManager nm = new ApplicationNotificationsManager(
|
||||
fakeSession.getScope(),
|
||||
new SocialNetworkingUser(fakeSession.getUsername(), fakeSession.getUserEmailAddress(), fakeSession.getUserFullName(), fakeSession.getUserAvatarId())
|
||||
);
|
||||
Thread thread = new Thread(new MessageNotificationsThread(recipients, newMessageId, subject, messageText, nm));
|
||||
thread.start();
|
||||
} else {
|
||||
|
@ -371,7 +376,10 @@ public class PeriodicTask implements Runnable {
|
|||
String feedOwnerId = feed.getEntityId();
|
||||
boolean isAppFeed = feed.isApplicationFeed();
|
||||
|
||||
NotificationsManager nm = new ApplicationNotificationsManager(fakeSession);
|
||||
NotificationsManager nm = new ApplicationNotificationsManager(
|
||||
fakeSession.getScope(),
|
||||
new SocialNetworkingUser(fakeSession.getUsername(), fakeSession.getUserEmailAddress(), fakeSession.getUserFullName(), fakeSession.getUserAvatarId())
|
||||
);
|
||||
if (! fakeSession.getUsername().equals(feedOwnerId) && (!isAppFeed)) {
|
||||
boolean result = nm.notifyLikedFeed(feedOwnerId, feedId, "");
|
||||
_log.trace("Like Notification to post owner added? " + result);
|
||||
|
@ -398,7 +406,10 @@ public class PeriodicTask implements Runnable {
|
|||
boolean isAppFeed = feed.isApplicationFeed();
|
||||
|
||||
//if the user who commented this post is not the user who posted it notifies the poster user (Feed owner)
|
||||
NotificationsManager nm = new ApplicationNotificationsManager(fakeSession);
|
||||
NotificationsManager nm = new ApplicationNotificationsManager(
|
||||
fakeSession.getScope(),
|
||||
new SocialNetworkingUser(fakeSession.getUsername(), fakeSession.getUserEmailAddress(), fakeSession.getUserFullName(), fakeSession.getUserAvatarId())
|
||||
);
|
||||
if (! fakeSession.getUsername().equals(feedOwnerId) && (!isAppFeed)) {
|
||||
boolean result = nm.notifyOwnCommentReply(feedOwnerId, feedId, commentText, comment.getKey());
|
||||
_log.trace("Comment Notification to post owner added? " + result);
|
||||
|
|
Loading…
Reference in New Issue