comments: fix incorrect comment links in mentions.

Fix mentions incorrectly linking to comments like this:

    https://danbooru.donmai.us/posts/1234#comment-5678

when it should have been this

    https://danbooru.donmai.us/posts/1234#comment_5678

Change comment links to this to ensure they're permanent:

    https://danbooru.donmai.us/comments/5678

The comment show action will redirect from there to the post with the
comment in context.
This commit is contained in:
evazion
2021-01-21 15:36:49 -06:00
parent 168db63807
commit 25bf78f9eb
3 changed files with 3 additions and 3 deletions

View File

@@ -71,7 +71,7 @@ class CommentTest < ActiveSupport::TestCase
dmail = Dmail.last
assert_equal(<<-EOS.strip_heredoc, dmail.body)
@#{@comment.creator.name} mentioned you in a \"comment\":/posts/#{@comment.post_id}#comment-#{@comment.id} on post ##{@comment.post_id}:
@#{@comment.creator.name} mentioned you in comment ##{@comment.id} on post ##{@comment.post_id}:
[quote]
Hey @#{@user2.name} check this out!