Browse files

Fixed parsing of replies in search result processors.

  • Loading branch information...
1 parent 632d67d commit cf48d02de13d160df434c6f4e5de16c8abf0703a Simon Gaeremynck committed Sep 15, 2009
View
10 ...messaging/src/main/java/org/sakaiproject/kernel/message/MessageSearchResultProcessor.java
@@ -135,13 +135,17 @@ public void writeNode(JSONWriter write, Node resultNode) throws JSONException,
private void parsePreviousMessages(Node node, JSONWriter write) throws JSONException,
ValueFormatException, PathNotFoundException, RepositoryException {
- String path = messagingService.getMessageStorePathFromMessageNode(node)
+
+ Session s = node.getSession();
+ String id = node.getProperty(MessageConstants.PROP_SAKAI_PREVIOUS_MESSAGE).getString();
+ String path = messagingService.getFullPathToMessage(s.getUserID(), id, s);
+ /*
+ String path = messagingService.getMessageStorePathFromMessageNode(node) + "/"
+ node.getProperty(MessageConstants.PROP_SAKAI_PREVIOUS_MESSAGE).getString();
- path = PathUtils.normalizePath(path);
+ path = PathUtils.normalizePath(path);*/
LOGGER.info("Getting message at {}", path);
- Session s = node.getSession();
Node previousMessage = (Node) s.getItem(path);
writeNode(write, previousMessage);
}

0 comments on commit cf48d02

Please sign in to comment.