Add own posts and replies to all posts and replies.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index 54bc2cf..a10d462 100644 (file)
@@ -1375,11 +1375,21 @@ public class Core extends AbstractService implements SoneProvider, PostProvider,
                                knownSones.add(friend);
                        }
                }
+               synchronized (this.posts) {
+                       for (Post post : posts) {
+                               this.posts.put(post.getId(), post);
+                       }
+               }
                synchronized (knownPosts) {
                        for (Post post : posts) {
                                knownPosts.add(post.getId());
                        }
                }
+               synchronized (this.replies) {
+                       for (PostReply postReply : replies) {
+                               this.replies.put(postReply.getId(), postReply);
+                       }
+               }
                synchronized (knownReplies) {
                        for (PostReply reply : replies) {
                                knownReplies.add(reply.getId());