This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new a07d0dfd Separate invites and replies
a07d0dfd is described below

commit a07d0dfd72b501f41df49971ec344de8b4be8ca9
Author: Sebb <[email protected]>
AuthorDate: Thu Sep 4 14:55:28 2025 +0100

    Separate invites and replies
---
 www/members/check_invitations.cgi | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/www/members/check_invitations.cgi 
b/www/members/check_invitations.cgi
index b434100e..4af37edb 100755
--- a/www/members/check_invitations.cgi
+++ b/www/members/check_invitations.cgi
@@ -85,21 +85,22 @@ def setup_data
       # Allow for forwarded mail (may not catch original and reply ...)
       if v[:Subject] =~ /^(R[eE]: ?|R[eE]:|AW: )?(?:Fwd: )?Invitation to 
(?:re-)?join The Apache Software Foundation/
         pfx = $1
-        to = Mail::AddressList.new(v[:To])
-        cc = Mail::AddressList.new(v[:Cc])
-        (to.addresses + cc.addresses).each do |add|
-          addr = add.address
-          next if addr == '[email protected]'
-          prev = invites[:emails][addr] || [nil, 365] # so script works long 
after the meeting
-          if age < prev[1] # Only store later dates
-            invites[:emails][addr] = [link, age] # temp save the timestamp
-            invites[:names][add.display_name] = [link, age] if add.display_name
-          end
-        end
         if pfx # it's a reply
           add = Mail::Address.new(v[:From])
           replies[:emails][add.address] = [link, age]
           replies[:names][add.display_name] = [link, age] if add.display_name
+        else
+          to = Mail::AddressList.new(v[:To])
+          cc = Mail::AddressList.new(v[:Cc])
+          (to.addresses + cc.addresses).each do |add|
+            addr = add.address
+            next if addr == '[email protected]'
+            prev = invites[:emails][addr] || [nil, 365] # so script works long 
after the meeting
+            if age < prev[1] # Only store later dates (why?)
+              invites[:emails][addr] = [link, age] # temp save the timestamp
+              invites[:names][add.display_name] = [link, age] if 
add.display_name
+            end
+          end
         end
       end
     end

Reply via email to