Link directly to the comment from notification mails

closes #7124
This commit is contained in:
Benjamin Neff 2016-09-25 20:56:31 +02:00 committed by Dennis Schubert
parent dfb5b717b6
commit 20cdbe262e
No known key found for this signature in database
GPG key ID: 5A0304BEA7966D7E
4 changed files with 7 additions and 6 deletions

View file

@ -38,6 +38,7 @@ Note: Although this is a minor release, the configuration file changed because t
* Add number of unreviewed reports to admin dashboard and admin sidebar [#7109](https://github.com/diaspora/diaspora/pull/7109)
* Don't federate to pods that have been offline for an extended period of time [#7120](https://github.com/diaspora/diaspora/pull/7120)
* Add In-Reply-To and References headers to notification mails [#7122](https://github.com/diaspora/diaspora/pull/7122)
* Directly link to a comment in commented notification mails [#7124](https://github.com/diaspora/diaspora/pull/7124)
# 0.6.0.1

View file

@ -2,4 +2,4 @@
[<%= t('notifier.comment_on_post.reply', :name => @notification.comment_post.author_first_name) %>][1]
[1]: <%= post_url(@notification.comment_post) %>
[1]: <%= post_url(@notification.comment_post, anchor: @notification.comment.guid) %>

View file

@ -2,4 +2,4 @@
[<%= t('notifier.comment_on_post.reply', :name => @notification.comment.parent_author_name) %>][1]
[1]: <%= post_url(@notification.comment.post) %>
[1]: <%= post_url(@notification.comment.post, anchor: @notification.comment.guid) %>

View file

@ -269,8 +269,8 @@ describe Notifier, type: :mailer do
expect(comment_mail.body.encoded).to include(comment.text)
end
it "contains the original post's link" do
expect(comment_mail.body.encoded.include?("#{comment.post.id}")).to be true
it "contains the original post's link with comment anchor" do
expect(comment_mail.body.encoded).to include("#{comment.post.id}##{comment.guid}")
end
it "should not include translation fallback" do
@ -315,8 +315,8 @@ describe Notifier, type: :mailer do
expect(comment_mail.body.encoded).to include(comment.text)
end
it "contains the original post's link" do
expect(comment_mail.body.encoded).to include("#{comment.post.id}")
it "contains the original post's link with comment anchor" do
expect(comment_mail.body.encoded).to include("#{comment.post.id}##{comment.guid}")
end
it "should not include translation fallback" do