X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=94a0fb638ba369ece756055fcb4a0a6a5f41b000;hb=90c1cc77e0a58279284e4378f8ea4cc63f6dd30e;hp=f9b6929b6a6650057586f6a3635738e8972e2e5a;hpb=c8ec218c74a94810f5b416aa216b60382560a4d9;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index f9b6929..94a0fb6 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -242,11 +242,15 @@ public class WebInterface implements CoreListener { Template newPostNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/newPostNotification.html")); newPostNotification = new ListNotification("new-post-notification", "posts", newPostNotificationTemplate, false); - localPostNotification = new ListNotification("local-post-notification", "posts", newPostNotificationTemplate, false); + + Template localPostNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/newPostNotification.html")); + localPostNotification = new ListNotification("local-post-notification", "posts", localPostNotificationTemplate, false); Template newReplyNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/newReplyNotification.html")); newReplyNotification = new ListNotification("new-reply-notification", "replies", newReplyNotificationTemplate, false); - localReplyNotification = new ListNotification("local-reply-notification", "replies", newReplyNotificationTemplate, false); + + Template localReplyNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/newReplyNotification.html")); + localReplyNotification = new ListNotification("local-reply-notification", "replies", localReplyNotificationTemplate, false); Template mentionNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/mentionNotification.html")); mentionNotification = new ListNotification("mention-notification", "posts", mentionNotificationTemplate, false); @@ -762,9 +766,6 @@ public class WebInterface implements CoreListener { */ @Override public void newReplyFound(Reply reply) { - if (reply.getPost().getSone() == null) { - return; - } boolean isLocal = getCore().isLocalSone(reply.getSone()); if (isLocal) { localReplyNotification.add(reply);