From 3e32d6aaac764df8193d7ceab22ac75ea52f20ea Mon Sep 17 00:00:00 2001 From: "massimiliano.assante" Date: Thu, 18 Apr 2013 15:56:34 +0000 Subject: [PATCH] differentiate notification for also commented depending if the owner commented too git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@73627 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../social/ApplicationNotificationsManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java b/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java index 88f157b..3c4e69c 100644 --- a/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java +++ b/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java @@ -338,6 +338,10 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen */ @Override public boolean notifyCommentReply(String userIdToNotify, String feedid, String commentText, String feedOwnerFullName) { + String notificationText = (aslSession.getUserFullName().compareTo(feedOwnerFullName) == 0) ? + "also commented on his post: " + escapeHtml(commentText) + : + "also commented on " + feedOwnerFullName + "'s post: " + escapeHtml(commentText); Notification not = new Notification( UUID.randomUUID().toString(), NotificationType.COMMENT, @@ -345,9 +349,7 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen feedid, //the post new Date(), "/group/data-e-infrastructure-gateway?oid="+feedid, - - //also commented on Luca Frosini's post - "also commented on " + feedOwnerFullName + "'s post: " + escapeHtml(commentText), + notificationText, false, aslSession.getUsername(), aslSession.getUserFullName(),