Only add mention notification if post of reply is downloaded.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / WebInterface.java
index 3eb1ac3..fa6f52c 100644 (file)
@@ -772,7 +772,7 @@ public class WebInterface implements CoreListener {
                }
                if (!hasFirstStartNotification()) {
                        notificationManager.addNotification(isLocal ? localReplyNotification : newReplyNotification);
-                       if (!getMentionedSones(reply.getText()).isEmpty() && !isLocal) {
+                       if (!getMentionedSones(reply.getText()).isEmpty() && !isLocal && (reply.getPost().getSone() != null)) {
                                mentionNotification.add(reply.getPost());
                                notificationManager.addNotification(mentionNotification);
                        }