Fix comment link in email notification. This fixes http://dev.plone.org/plone/ticket/11413
svn path=/plone.app.discussion/trunk/; revision=49031
This commit is contained in:
parent
49504c1ddd
commit
f8c39c1b87
11
CHANGES.txt
11
CHANGES.txt
@ -1,6 +1,17 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
2.0.1 (2011-04-22)
|
||||
------------------
|
||||
|
||||
- Fix comment link in email notification. This fixes
|
||||
http://dev.plone.org/plone/ticket/11413.
|
||||
[timo]
|
||||
|
||||
- Redirect to the comment itself when notifying a user about a new comment.
|
||||
[timo]
|
||||
|
||||
|
||||
2.0 (2011-04-21)
|
||||
----------------
|
||||
|
||||
|
@ -253,8 +253,9 @@ def notify_user(obj, event):
|
||||
message = translate(Message(
|
||||
MAIL_NOTIFICATION_MESSAGE,
|
||||
mapping={'title': safe_unicode(content_object.title),
|
||||
'link': obj.absolute_url()}),
|
||||
context=obj.REQUEST)
|
||||
'link': content_object.absolute_url() +
|
||||
'/view#' + obj.id}),
|
||||
context=obj.REQUEST)
|
||||
for email in emails:
|
||||
# Send email
|
||||
try:
|
||||
@ -313,7 +314,8 @@ def notify_moderator(obj, event):
|
||||
subject = translate(_(u"A comment has been posted."), context=obj.REQUEST)
|
||||
message = translate(Message(MAIL_NOTIFICATION_MESSAGE,
|
||||
mapping={'title': safe_unicode(content_object.title),
|
||||
'link': obj.absolute_url()}),
|
||||
'link': content_object.absolute_url() +
|
||||
'/view#' + obj.id}),
|
||||
context=obj.REQUEST)
|
||||
|
||||
# Send email
|
||||
|
@ -84,7 +84,7 @@ class TestUserNotificationUnit(unittest.TestCase):
|
||||
"A comment on \'K=C3=B6lle Alaaf\' has been posted here:"
|
||||
in msg)
|
||||
self.assertTrue(
|
||||
"http://nohost/plone/d=\noc1/++conversation++default/%s"
|
||||
"http://nohost/plone/d=\noc1/view#%s"
|
||||
% comment_id
|
||||
in msg)
|
||||
|
||||
@ -217,7 +217,7 @@ class TestModeratorNotificationUnit(unittest.TestCase):
|
||||
"A comment on \'K=C3=B6lle Alaaf\' has been posted here:"
|
||||
in msg)
|
||||
self.assertTrue(
|
||||
"http://nohost/plone/d=\noc1/++conversation++default/%s"
|
||||
"http://nohost/plone/d=\noc1/view#%s"
|
||||
% comment_id
|
||||
in msg)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user