found the bug
This commit is contained in:
parent
5af56a039a
commit
09ca845311
|
@ -200,7 +200,7 @@ public class Comments {
|
|||
String userid = username;
|
||||
Date time = new Date();
|
||||
|
||||
String postOwnerId = CassandraConnection.getInstance().getDatabookStore().readPost(postId).getKey();
|
||||
String postOwnerId = CassandraConnection.getInstance().getDatabookStore().readPost(postId).getEntityId();
|
||||
Comment theComment = SocialUtils.commentPost(userid, time, postId, commentText, postOwnerId, context);
|
||||
if (theComment != null)
|
||||
logger.info("Added comment " + theComment.toString());
|
||||
|
|
|
@ -556,10 +556,10 @@ public class SocialUtils {
|
|||
//if the comment was correctly delivered notify users involved
|
||||
SocialNetworkingUser socialUser = new SocialNetworkingUser(userid, email, fullName, thumbnailURL);
|
||||
|
||||
NotificationsManager nm = new ApplicationNotificationsManager(UserManagerWSBuilder.getInstance().getUserManager(), site, context, socialUser, NEWS_FEED_PORTLET_CLASSNAME);
|
||||
NotificationsManager nm = new ApplicationNotificationsManager(uManager, site, context, socialUser, NEWS_FEED_PORTLET_CLASSNAME);
|
||||
|
||||
//if the user who commented this post is not the user who posted it notify the poster user (Post owner)
|
||||
if (! user.getUsername().equals(postOwnerId)) {
|
||||
if (! user.getUsername().equals(postOwnerId)) {
|
||||
boolean resultNotifyOwnComment = nm.notifyOwnCommentReply(postOwnerId, postId, escapedCommentText, theComment.getKey());
|
||||
logger.info("Comment Notification to post owner added? " + resultNotifyOwnComment);
|
||||
}
|
||||
|
@ -569,10 +569,10 @@ public class SocialUtils {
|
|||
likesThread.start();
|
||||
|
||||
//notify the other users who commented this post (excluding the ones above)
|
||||
// Thread commentsNotificationthread = new Thread(new CommentNotificationsThread(
|
||||
// CassandraConnection.getInstance().getDatabookStore(),
|
||||
// uManager, user.getUsername(), theComment.getFeedid(), escapedCommentText, nm, postOwnerId, theComment.getKey(), likes));
|
||||
// commentsNotificationthread.start();
|
||||
Thread commentsNotificationthread = new Thread(new CommentNotificationsThread(
|
||||
CassandraConnection.getInstance().getDatabookStore(),
|
||||
uManager, user.getUsername(), theComment.getFeedid(), escapedCommentText, nm, postOwnerId, theComment.getKey(), likes));
|
||||
commentsNotificationthread.start();
|
||||
|
||||
//send the notification to the mentioned users, if any
|
||||
if (mentionedUsers != null && mentionedUsers.size() > 0) {
|
||||
|
|
Loading…
Reference in New Issue