long postTime = configuration.getLongValue(postPrefix + "/Time").getValue((long) 0);
String postText = configuration.getStringValue(postPrefix + "/Text").getValue(null);
if ((postTime == 0) || (postText == null)) {
logger.log(Level.WARNING, "Invalid post found, aborting load!");
return;
}
long postTime = configuration.getLongValue(postPrefix + "/Time").getValue((long) 0);
String postText = configuration.getStringValue(postPrefix + "/Text").getValue(null);
if ((postTime == 0) || (postText == null)) {
logger.log(Level.WARNING, "Invalid post found, aborting load!");
return;
}
- posts.add(getPost(postId).setSone(sone).setTime(postTime).setText(postText));
+ Post post = getPost(postId).setSone(sone).setTime(postTime).setText(postText);
+ if ((postRecipientId != null) && (postRecipientId.length() == 43)) {
+ post.setRecipient(getSone(postRecipientId));
+ }
+ posts.add(post);
for (Post post : sone.getPosts()) {
String postPrefix = sonePrefix + "/Posts/" + postCounter++;
configuration.getStringValue(postPrefix + "/ID").setValue(post.getId());
for (Post post : sone.getPosts()) {
String postPrefix = sonePrefix + "/Posts/" + postCounter++;
configuration.getStringValue(postPrefix + "/ID").setValue(post.getId());
configuration.getLongValue(postPrefix + "/Time").setValue(post.getTime());
configuration.getStringValue(postPrefix + "/Text").setValue(post.getText());
}
configuration.getLongValue(postPrefix + "/Time").setValue(post.getTime());
configuration.getStringValue(postPrefix + "/Text").setValue(post.getText());
}