Don’t show mention notifications for replies from the future.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 26 Sep 2011 17:53:33 +0000 (19:53 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 26 Sep 2011 17:53:33 +0000 (19:53 +0200)
src/main/java/net/pterodactylus/sone/web/WebInterface.java

index d72cec2..283e156 100644 (file)
@@ -814,7 +814,7 @@ public class WebInterface implements CoreListener {
                }
                if (!hasFirstStartNotification()) {
                        notificationManager.addNotification(isLocal ? localReplyNotification : newReplyNotification);
-                       if (!getMentionedSones(reply.getText()).isEmpty() && !isLocal && (reply.getPost().getSone() != null)) {
+                       if (!getMentionedSones(reply.getText()).isEmpty() && !isLocal && (reply.getPost().getSone() != null) && (reply.getTime() <= System.currentTimeMillis())) {
                                mentionNotification.add(reply.getPost());
                                notificationManager.addNotification(mentionNotification);
                        }