Use a unique ID for posts
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index 8e00e23..d442e69 100644 (file)
@@ -1476,7 +1476,7 @@ public class Core extends AbstractService implements SoneProvider, PostProvider,
                        int postCounter = 0;
                        for (Post post : sone.getPosts()) {
                                String postPrefix = sonePrefix + "/Posts/" + postCounter++;
-                               configuration.getStringValue(postPrefix + "/ID").setValue(post.getId());
+                               configuration.getStringValue(postPrefix + "/ID").setValue(post.getInternalId());
                                configuration.getStringValue(postPrefix + "/Recipient").setValue(post.getRecipientId().orNull());
                                configuration.getLongValue(postPrefix + "/Time").setValue(post.getTime());
                                configuration.getStringValue(postPrefix + "/Text").setValue(post.getText());
@@ -1530,7 +1530,7 @@ public class Core extends AbstractService implements SoneProvider, PostProvider,
                                                continue;
                                        }
                                        String imagePrefix = sonePrefix + "/Images/" + imageCounter++;
-                                       configuration.getStringValue(imagePrefix + "/ID").setValue(image.getId());
+                                       configuration.getStringValue(imagePrefix + "/ID").setValue(image.getInternalId());
                                        configuration.getStringValue(imagePrefix + "/Album").setValue(album.getInternalId());
                                        configuration.getStringValue(imagePrefix + "/Key").setValue(image.getKey());
                                        configuration.getStringValue(imagePrefix + "/Title").setValue(image.getTitle());