- checkState((recipient == null) || !recipient.equals(sender), "sender and recipient must not be the same");
- return new PostImpl(randomId ? UUID.randomUUID().toString() : id, sender, recipient, currentTime ? System.currentTimeMillis() : time, text);
+ checkState((recipientId == null) || !recipientId.equals(senderId), "sender and recipient must not be the same");
+ return new PostImpl(soneProvider, randomId ? UUID.randomUUID().toString() : id, senderId, recipientId, currentTime ? System.currentTimeMillis() : time, text);