Only add @Sone to reply text field if not replying to yourself.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 7 Jun 2011 11:59:54 +0000 (13:59 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 7 Jun 2011 11:59:54 +0000 (13:59 +0200)
src/main/resources/static/javascript/sone.js

index c9d51c4..60a6a0b 100644 (file)
@@ -83,7 +83,9 @@ function addCommentLink(postId, author, element, insertAfterThisElement) {
                                });
                        })(replyElement);
                        textArea = replyElement.find("input.reply-input").focus().data("textarea");
-                       textArea.val(textArea.val() + "@sone://" + author + " ");
+                       if (author != getCurrentSoneId()) {
+                               textArea.val(textArea.val() + "@sone://" + author + " ");
+                       }
                });
                return commentElement;
        })(postId, author);