X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FCore.java;h=52ebfab7894ec0a21d7ef03ab09034637513e380;hp=24f1209b1ac110f145b475e0d6562423f2775798;hb=f7a67e62c110d3bf07a485a1d06f12d48b30e4d3;hpb=c1b01520dde989b59b94bcd7a894be025ac70404 diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 24f1209..52ebfab 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -1143,9 +1143,7 @@ public class Core implements IdentityListener { for (Post post : sone.getPosts()) { String postPrefix = sonePrefix + "/Posts/" + postCounter++; configuration.getStringValue(postPrefix + "/ID").setValue(post.getId()); - if (post.getRecipient() != null) { - configuration.getStringValue(postPrefix + "/Recipient").setValue(post.getRecipient().getId()); - } + configuration.getStringValue(postPrefix + "/Recipient").setValue((post.getRecipient() != null) ? post.getRecipient().getId() : null); configuration.getLongValue(postPrefix + "/Time").setValue(post.getTime()); configuration.getStringValue(postPrefix + "/Text").setValue(post.getText()); }