Make Sone returned by a Sone provider optional.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / impl / AbstractPostBuilder.java
index 342ea5c..3a56dc9 100644 (file)
@@ -82,7 +82,7 @@ public abstract class AbstractPostBuilder implements PostBuilder {
                this.currentTime = false;
                this.time = post.getTime();
                this.text = post.getText();
-               this.recipientId = (post.getRecipient() != null) ? post.getRecipient().getId() : null;
+               this.recipientId = post.getRecipientId().orNull();
                return this;
        }