Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

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

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: HannesHH
[Submitted to the original trac issue database at 7.21pm, Friday, 10th July 2009]

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; }

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 1.22pm, Saturday, 11th July 2009]

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.

@openstreetmap-trac
Copy link
Author

Author: tomhughes
[Added to the original trac issue at 1.25pm, Saturday, 11th July 2009]

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant