Merge branch 'partial-rewrite' into less-critical
[Sone.git] / src / main / java / net / pterodactylus / sone / web / SearchPage.java
index 6cb2c0c..6cbb11f 100644 (file)
@@ -310,7 +310,7 @@ public class SearchPage extends SoneTemplatePage {
         */
        private String getSoneId(String phrase) {
                String soneId = phrase.startsWith("sone://") ? phrase.substring(7) : phrase;
-               return (webInterface.getCore().getSone(soneId, false) != null) ? soneId : null;
+               return (webInterface.getCore().getSone(soneId) != null) ? soneId : null;
        }
 
        /**
@@ -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;
        }
 
        /**