X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdatabase%2Fmemory%2FMemoryPost.java;h=451b6b50c04517c3ca3c21d62c12732737a6a8f2;hb=438378deab1514f0f608d975ef65f5b7aea44ccb;hp=724c627298a16d8fa6b181f1bf776714e4bda51f;hpb=6f1f26e3998cfef155b0cf59152827accea70d30;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/database/memory/MemoryPost.java b/src/main/java/net/pterodactylus/sone/database/memory/MemoryPost.java
index 724c627..451b6b5 100644
--- a/src/main/java/net/pterodactylus/sone/database/memory/MemoryPost.java
+++ b/src/main/java/net/pterodactylus/sone/database/memory/MemoryPost.java
@@ -1,5 +1,5 @@
/*
- * Sone - MemoryPost.java - Copyright © 2010â2016 David Roden
+ * Sone - MemoryPost.java - Copyright © 2010â2020 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,8 +30,6 @@ 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.
- *
- * @author David âBombeâ Roden
*/
class MemoryPost implements Post {
@@ -122,7 +120,7 @@ class MemoryPost implements Post {
*/
@Override
public Optional getRecipient() {
- return fromNullable(soneProvider.getSone(recipientId));
+ return recipientId == null ? Optional.absent() : fromNullable(soneProvider.getSone(recipientId));
}
/**