Remove copy method from post builder.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneDownloader.java
index 34ca521..c026a37 100644 (file)
@@ -240,7 +240,7 @@ public class SoneDownloader extends AbstractService {
                        return null;
                }
 
-               Sone sone = new DefaultSone(originalSone.getId(), originalSone.isLocal()).setIdentity(originalSone.getIdentity());
+               Sone sone = new DefaultSone(core.getDatabase(), originalSone.getId(), originalSone.isLocal()).setIdentity(originalSone.getIdentity());
 
                SimpleXML soneXml;
                try {
@@ -368,9 +368,9 @@ public class SoneDownloader extends AbstractService {
                                        return null;
                                }
                                try {
-                                       PostBuilder postBuilder = core.postBuilder();
+                                       PostBuilder postBuilder = sone.newPostBuilder();
                                        /* TODO - parse time correctly. */
-                                       postBuilder.withId(postId).from(sone.getId()).withTime(Long.parseLong(postTime)).withText(postText);
+                                       postBuilder.withId(postId).withTime(Long.parseLong(postTime)).withText(postText);
                                        if ((postRecipientId != null) && (postRecipientId.length() == 43)) {
                                                postBuilder.to(postRecipientId);
                                        }