* The post that this reply refers to
* @param text
* The text of the reply
+ * @return The created reply
*/
- public void createReply(Sone sone, Post post, String text) {
- createReply(sone, post, System.currentTimeMillis(), text);
+ public Reply createReply(Sone sone, Post post, String text) {
+ return createReply(sone, post, System.currentTimeMillis(), text);
}
/**
* The time of the reply
* @param text
* The text of the reply
+ * @return The created reply
*/
- public void createReply(Sone sone, Post post, long time, String text) {
+ public Reply createReply(Sone sone, Post post, long time, String text) {
if (!isLocalSone(sone)) {
logger.log(Level.FINE, "Tried to create reply for non-local Sone: %s", sone);
- return;
+ return null;
}
Reply reply = new Reply(sone, post, System.currentTimeMillis(), text);
synchronized (replies) {
}
sone.addReply(reply);
saveSone(sone);
+ return reply;
}
/**