Opened 10 years ago

Closed 10 years ago

#2053 closed defect (fixed)

Don't send diary comment notification if commenter is diary author

Reported by: HannesHH Owned by: Tom Hughes
Priority: minor Milestone:
Component: website Version:
Keywords: diary comment notification mail Cc:

Description

If you comment on your own diary post, you will get a mail about it. This seems unnecessary.

I don't know Ruby at all, otherwise I would try to send a patch, but it seems like a very easy fix. In http://trac.openstreetmap.org/browser/sites/rails_port/app/models/notifier.rb in the function diary_comment_notification add something like

if(comment.diary_entry.user.display_name != comment.user.display_name) { do send notification; } else { return; }

Change History (2)

comment:1 Changed 10 years ago by Tom Hughes

You can't do it in the notifier like that - once you're in there you can't abort sending the mail so you have to do it outside.

Also you don't need to compare the names - you can just compare the user objects.

comment:2 Changed 10 years ago by tomhughes

Resolution: fixed
Status: newclosed

(In [16433]) Don't send a noification email if somebody comments on their own diary entry. Fixes #2053.

Note: See TracTickets for help on using tickets.