Add own posts and replies to all posts and replies.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 26 Jan 2013 11:40:07 +0000 (12:40 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 26 Jan 2013 11:40:07 +0000 (12:40 +0100)
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());