[dw-free] don't-email-comments setting should still email replies to your comments
[commit: http://hg.dwscoalition.org/dw-free/rev/1ebb4fc0f06a]
http://bugs.dwscoalition.org/show_bug.cgi?id=1145
When you disable comment emails on a post, we should still email you when
someone replies to a comment you've left on that post.
Patch by
afuna.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=1145
When you disable comment emails on a post, we should still email you when
someone replies to a comment you've left on that post.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/LJ/Event/JournalNewComment.pm
-------------------------------------------------------------------------------- diff -r 48cd12e3c55f -r 1ebb4fc0f06a cgi-bin/LJ/Event/JournalNewComment.pm --- a/cgi-bin/LJ/Event/JournalNewComment.pm Tue Dec 15 02:17:04 2009 +0000 +++ b/cgi-bin/LJ/Event/JournalNewComment.pm Tue Dec 15 02:22:49 2009 +0000 @@ -429,8 +429,9 @@ sub matches_filter { } # not a match if this user posted the entry and they don't want comments emailed, - # unless they posted it. (don't need to check again for the cap, since we did above.) - if (LJ::u_equals($entry->poster, $watcher) && !$watcher->prop('opt_getselfemail')) { + # unless it is a reply to one of their comments or they posted it. (don't need to check again for the cap, since we did above.) + my $reply_to_own_comment = $comment->parent ? LJ::u_equals( $comment->parent->poster, $watcher ) : 0; + if ( LJ::u_equals( $entry->poster, $watcher ) && ! ( $reply_to_own_comment || $watcher->prop( 'opt_getselfemail' ) ) ) { return 0 if $entry->prop('opt_noemail') && $subscr->method =~ /Email$/; } --------------------------------------------------------------------------------