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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user