Only add @Sone to reply text field if not replying to yourself.
[Sone.git] / 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);