+ Builder<PostReply> postReplies = ImmutableList.<PostReply>builder().addAll(database.getReplies(postId));
+ if (isCompatibilityMode(CompatibilityMode.oldElementIds)) {
+ Optional<Post> post = getPost(postId);
+ if (post.isPresent()) {
+ postReplies.addAll(database.getReplies(post.get().getInternalId()));
+ }
+ }
+ return Ordering.from(Reply.TIME_COMPARATOR).sortedCopy(postReplies.build());