From: David ‘Bombe’ Roden Date: Sat, 26 Jan 2013 00:02:15 +0000 (+0100) Subject: Check correctly for the presence of a post. X-Git-Tag: 0.8.5^2~3^2~49 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fdb4895ff440a569367a43d4316734c88c6ee6d3;p=Sone.git Check correctly for the presence of a post. --- 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; } /**