X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FSearchPage.java;h=e979a49d647fe714f641668dd8d03052452180a0;hp=6cb2c0c0c2c69ffaccedb63f255ae76c0e5deca5;hb=fdb4895ff440a569367a43d4316734c88c6ee6d3;hpb=3a6d0e77f2b09791ee70dd3739a3e953ac91eb79 diff --git a/src/main/java/net/pterodactylus/sone/web/SearchPage.java b/src/main/java/net/pterodactylus/sone/web/SearchPage.java index 6cb2c0c..e979a49 100644 --- a/src/main/java/net/pterodactylus/sone/web/SearchPage.java +++ b/src/main/java/net/pterodactylus/sone/web/SearchPage.java @@ -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; } /**