enhanced to read portal sender email from portal property file, removed periods at the end of notification emails.

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@117206 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2015-07-13 17:37:32 +00:00
parent 86fa0951cc
commit aa32741422
1 changed files with 55 additions and 47 deletions

View File

@ -480,7 +480,9 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
feedid, //the post
new Date(),
"/group/data-e-infrastructure-gateway?oid="+feedid,
"commented on your post: " + escapeHtml(feedText),
"commented on your post: "
+ "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; border-left: 3px solid #ccc; font-style: italic;\">\""
+ escapeHtml(feedText) +"\"</div>",
false,
aslSession.getUsername(),
aslSession.getUserFullName(),
@ -493,9 +495,13 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
@Override
public boolean notifyCommentReply(String userIdToNotify, String feedid, String commentText, String feedOwnerFullName, String feedOwnerId) {
String notificationText = (aslSession.getUsername().compareTo(feedOwnerId) == 0) ?
"also commented on his post: " + escapeHtml(commentText)
"also commented on his post: "
+ "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; border-left: 3px solid #ccc; font-style: italic;\">\""
+ escapeHtml(commentText) +"\"</div>"
:
"also commented on " + feedOwnerFullName + "'s post: " + escapeHtml(commentText);
"also commented on " + feedOwnerFullName + "'s post: "
+ "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; border-left: 3px solid #ccc; font-style: italic;\">\""
+ escapeHtml(commentText) +"\"</div>";
Notification not = new Notification(
UUID.randomUUID().toString(),
NotificationType.COMMENT,
@ -522,7 +528,9 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
feedid, //the post
new Date(),
"/group/data-e-infrastructure-gateway?oid="+feedid,
"commented on one of your favorite posts: " + escapeHtml(commentText),
"commented on one of your favorite posts: "
+ "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; border-left: 3px solid #ccc; font-style: italic;\">\""
+ escapeHtml(commentText) +"\"</div>",
false,
aslSession.getUsername(),
aslSession.getUserFullName(),