From: David ‘Bombe’ Roden Date: Sat, 26 Jan 2013 11:40:07 +0000 (+0100) Subject: Add own posts and replies to all posts and replies. X-Git-Tag: 0.8.5^2~3^2~43 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d07f50c957382e37dc7a2a1680631f69385dbbda;p=Sone.git Add own posts and replies to all posts and replies. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 54bc2cf..a10d462 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -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());