diff --git a/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java b/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java index f29a8e4..40d405d 100644 --- a/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java +++ b/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java @@ -337,7 +337,28 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen * {@inheritDoc} */ @Override - public boolean notifyCommentReply(String userIdToNotify, String feedid, String feedText) { + public boolean notifyCommentReply(String userIdToNotify, String feedid, String feedText, String feedOwnerFullName) { + Notification not = new Notification( + UUID.randomUUID().toString(), + NotificationType.COMMENT, + userIdToNotify, //user no notify + feedid, //the post + new Date(), + "/group/data-e-infrastructure-gateway?oid="+feedid, + + //also commented on Luca Frosini's post + "also commented on on one of your favorite post: " + escapeHtml(feedText), + false, + aslSession.getUsername(), + aslSession.getUserFullName(), + aslSession.getUserAvatarId()); + return saveNotification(not); + } + /** + * {@inheritDoc} + */ + @Override + public boolean notifyCommentOnFavorite(String userIdToNotify, String feedid, String feedText) { Notification not = new Notification( UUID.randomUUID().toString(), NotificationType.COMMENT, diff --git a/src/main/java/org/gcube/applicationsupportlayer/social/NotificationsManager.java b/src/main/java/org/gcube/applicationsupportlayer/social/NotificationsManager.java index 5eab7c1..9f6e63b 100644 --- a/src/main/java/org/gcube/applicationsupportlayer/social/NotificationsManager.java +++ b/src/main/java/org/gcube/applicationsupportlayer/social/NotificationsManager.java @@ -111,9 +111,19 @@ public interface NotificationsManager { * @param userIdToNotify the user you want to notify * @param feedid the liked feedid * @param feedText the liked feed text or a portion of it + * @param feedOwnerFullName the full name of the user who created this post * @return true if the notification is correctly delivered, false otherwise */ - boolean notifyCommentReply(String userIdToNotify, String feedid, String feedText); + boolean notifyCommentReply(String userIdToNotify, String feedid, String feedText, String feedOwnerFullName); + /** + * use to notify a user that someone commented on one of his favorite posts + * + * @param userIdToNotify the user you want to notify + * @param feedid the liked feedid + * @param feedText the liked feed text or a portion of it + * @return true if the notification is correctly delivered, false otherwise + */ + boolean notifyCommentOnFavorite(String userIdToNotify, String feedid, String feedText); /** * use to notify a user that he was mentioned (tagged) on a post *