Merge branch 'next' into dev/image
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneInserter.java
index d4f53c1..44f8bbc 100644 (file)
@@ -244,7 +244,7 @@ public class SoneInserter extends AbstractService {
                                        }
                                        sone.setTime(insertTime);
                                        sone.setLatestEdition(finalUri.getEdition());
-                                       core.saveSone(sone);
+                                       core.touchConfiguration();
                                        success = true;
                                        logger.log(Level.INFO, "Inserted Sone ā€œ%sā€ at %s.", new Object[] { sone.getName(), finalUri });
                                } catch (SoneException se1) {
@@ -302,6 +302,7 @@ public class SoneInserter extends AbstractService {
                        soneProperties.put("replies", new ListBuilder<Reply>(new ArrayList<Reply>(sone.getReplies())).sort(new ReverseComparator<Reply>(Reply.TIME_COMPARATOR)).get());
                        soneProperties.put("likedPostIds", new HashSet<String>(sone.getLikedPostIds()));
                        soneProperties.put("likedReplyIds", new HashSet<String>(sone.getLikedReplyIds()));
+                       soneProperties.put("albums", Sone.flattenAlbums(sone.getAlbums()));
                }
 
                //