Store locality of a Sone in the Sone itself.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneDownloader.java
index 98337b9..4142dda 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - SoneDownloader.java - Copyright © 2010 David Roden
+ * Sone - SoneDownloader.java - Copyright © 2010–2012 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -236,7 +236,7 @@ public class SoneDownloader extends AbstractService {
                        return null;
                }
 
-               Sone sone = new Sone(originalSone.getId()).setIdentity(originalSone.getIdentity());
+               Sone sone = new Sone(originalSone.getId(), false).setIdentity(originalSone.getIdentity());
 
                SimpleXML soneXml;
                try {
@@ -403,7 +403,7 @@ public class SoneDownloader extends AbstractService {
                                        return null;
                                }
                                try {
-                                       replies.add(core.getReply(replyId).setSone(sone).setPost(core.getPost(replyPostId)).setTime(Long.parseLong(replyTime)).setText(replyText));
+                                       replies.add(core.getPostReply(replyId, true).setSone(sone).setPost(core.getPost(replyPostId)).setTime(Long.parseLong(replyTime)).setText(replyText));
                                } catch (NumberFormatException nfe1) {
                                        /* TODO - mark Sone as bad. */
                                        logger.log(Level.WARNING, String.format("Downloaded reply for Sone %s with invalid time: %s", sone, replyTime));