Merge branch 'next' into edit-wot-trust
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneInserter.java
index b79e620..fec4e8f 100644 (file)
@@ -163,6 +163,9 @@ public class SoneInserter extends AbstractService {
                        /* don’t insert locked Sones. */
                        if (core.isLocked(sone)) {
                                /* trigger redetection when the Sone is unlocked. */
+                               synchronized (sone) {
+                                       modified = !sone.getFingerprint().equals(lastInsertFingerprint);
+                               }
                                lastFingerprint = "";
                                lastModificationTime = 0;
                                continue;
@@ -257,7 +260,7 @@ public class SoneInserter extends AbstractService {
                        soneProperties.put("posts", new ArrayList<Post>(sone.getPosts()));
                        soneProperties.put("replies", new HashSet<Reply>(sone.getReplies()));
                        soneProperties.put("likedPostIds", new HashSet<String>(sone.getLikedPostIds()));
-                       soneProperties.put("likeReplyIds", new HashSet<String>(sone.getLikedReplyIds()));
+                       soneProperties.put("likedReplyIds", new HashSet<String>(sone.getLikedReplyIds()));
                }
 
                //