postBuilder.put(prefix + "ID", post.getId());
postBuilder.put(prefix + "Sone", post.getSone().getId());
- if (post.hasRecipient()) {
+ if (post.getRecipientId().isPresent()) {
postBuilder.put(prefix + "Recipient", post.getRecipientId().get());
}
postBuilder.put(prefix + "Time", post.getTime());
postBuilder.put(encodeLikes(core.getLikes(post), prefix + "Likes."));
if (includeReplies) {
- List<PostReply> replies = core.getReplies(post);
+ List<PostReply> replies = core.getReplies(post.getId());
postBuilder.put(encodeReplies(replies, prefix));
}
String postPrefix = prefix + postIndex++;
postBuilder.put(encodePost(post, postPrefix + ".", includeReplies));
if (includeReplies) {
- postBuilder.put(encodeReplies(Collections2.filter(core.getReplies(post), Reply.FUTURE_REPLY_FILTER), postPrefix + "."));
+ postBuilder.put(encodeReplies(Collections2.filter(core.getReplies(post.getId()), Reply.FUTURE_REPLY_FILTER), postPrefix + "."));
}
}