projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'release-0.8.9'
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
data
/
impl
/
PostImpl.java
diff --git
a/src/main/java/net/pterodactylus/sone/data/impl/PostImpl.java
b/src/main/java/net/pterodactylus/sone/data/impl/PostImpl.java
index
d008463
..
2d25715
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/data/impl/PostImpl.java
+++ b/
src/main/java/net/pterodactylus/sone/data/impl/PostImpl.java
@@
-23,6
+23,8
@@
import net.pterodactylus.sone.data.Post;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.database.SoneProvider;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.database.SoneProvider;
+import com.google.common.base.Optional;
+
/**
* A post is a short message that a user writes in his Sone to let other users
* know what is going on.
/**
* A post is a short message that a user writes in his Sone to let other users
* know what is going on.
@@
-94,14
+96,22
@@
public class PostImpl implements Post {
*/
@Override
public Sone getSone() {
*/
@Override
public Sone getSone() {
- return soneProvider.getSone(soneId);
+ return soneProvider.getSone(soneId).get();
+ }
+
+ /**
+ * {@inheritDocs}
+ */
+ @Override
+ public Optional<String> getRecipientId() {
+ return Optional.fromNullable(recipientId);
}
/**
* {@inheritDoc}
*/
@Override
}
/**
* {@inheritDoc}
*/
@Override
- public
Sone
getRecipient() {
+ public
Optional<Sone>
getRecipient() {
return soneProvider.getSone(recipientId);
}
return soneProvider.getSone(recipientId);
}