Check correctly for the presence of a post.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / SearchPage.java
index 6cb2c0c..e979a49 100644 (file)
@@ -323,7 +323,7 @@ public class SearchPage extends SoneTemplatePage {
         */
        private String getPostId(String phrase) {
                String postId = phrase.startsWith("post://") ? phrase.substring(7) : phrase;
-               return (webInterface.getCore().getPost(postId) != null) ? postId : null;
+               return (webInterface.getCore().getPost(postId).isPresent()) ? postId : null;
        }
 
        /**