Ignore a post if neither sender nor recipient match the currently viewed Sone.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 28 Nov 2010 20:19:14 +0000 (21:19 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 28 Nov 2010 20:19:14 +0000 (21:19 +0100)
src/main/resources/static/javascript/sone.js

index 1944efe..3646f73 100644 (file)
@@ -680,7 +680,7 @@ function loadNewPost(postId) {
        loadedPosts[postId] = true;
        $.getJSON("getPost.ajax", { "post" : postId }, function(data, textStatus) {
                if ((data != null) && data.success) {
-                       if (!isIndexPage() && !(isViewSonePage() && (getShownSoneId() == data.post.sone))) {
+                       if (!isIndexPage() && !(isViewSonePage() && ((getShownSoneId() == data.post.sone) || (getShownSoneId() == data.post.recipient)))) {
                                return;
                        }
                        var firstOlderPost = null;