mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-12-07 05:38 am

[dw-free] no notifications sent when email addresses are identical

[commit: http://hg.dwscoalition.org/dw-free/rev/398c6cfec608]

http://bugs.dwscoalition.org/show_bug.cgi?id=2137

Send notifications even if the email address is the same.

Patch by [personal profile] wyntarvox.

Files modified:
  • cgi-bin/LJ/Talk.pm
--------------------------------------------------------------------------------
diff -r 68edb73b6522 -r 398c6cfec608 cgi-bin/LJ/Talk.pm
--- a/cgi-bin/LJ/Talk.pm	Mon Dec 07 05:33:50 2009 +0000
+++ b/cgi-bin/LJ/Talk.pm	Mon Dec 07 05:38:30 2009 +0000
@@ -2283,15 +2283,15 @@ sub mail_comments {
         if ($paruserid) {
             $paru = LJ::load_userid($paruserid);
 
-            # we don't want to send email to a parent if the email address on the
-            # parent's user is the same as the email address on this comment's user
-            # is_diff_email: also so we don't auto-vivify $comment->{u}
-            my $is_diff_email = !$comment->{u} ||
-                $paru->email_raw ne $comment->{u}->email_raw;
+            # we don't want to send email to a parent if the parent user is the
+            # same as the comment user
+            # is_diff_user: also so we don't auto-vivify $comment->{u}
+            my $is_diff_user = !$comment->{u} ||
+                !LJ::u_equals( $paru, $comment->{u} );
 
             if ($paru->{'opt_gettalkemail'} eq "Y" &&
                 $paru->is_visible &&
-                $is_diff_email &&
+                $is_diff_user &&
                 $paru->{'status'} eq "A" &&
                 !$paru->gets_notified(journal => $journalu, arg1 => $ditemid, arg2 => $comment->{talkid}) 
 
--------------------------------------------------------------------------------