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 37e2c4be Keep most recent email
37e2c4be is described below
commit 37e2c4be1c23a05c56a9f10213a328dccf749cd9
Author: Sebb <[email protected]>
AuthorDate: Sun Mar 10 23:59:22 2024 +0000
Keep most recent email
---
www/members/invitations.cgi | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi
index ae937d49..fb4860ef 100755
--- a/www/members/invitations.cgi
+++ b/www/members/invitations.cgi
@@ -51,6 +51,7 @@ def setup_data
mail = YamlFile.read(index)
mail.each do |k, v|
link = lists_link(v)
+ envdate = v[:EnvelopeDate]
# This may not find all the invites ...
# Note: occasionally someone will forget to copy members@, in which case
the email
# may be sent as a reply
@@ -61,8 +62,11 @@ def setup_data
(to.addresses + cc.addresses).each do |add|
addr = add.address
next if addr == '[email protected]'
- invites[:emails][addr] = link
- invites[:names][add.display_name] = link if add.display_name
+ prev = invites[:emails][addr] || [nil,'']
+ if envdate > prev[1] # Only store later dates
+ invites[:emails][addr] = [link, envdate] # temp save the timestamp
+ invites[:names][add.display_name] = link if add.display_name
+ end
end
if pfx # it's a reply
add = Mail::Address.new(v[:From])
@@ -73,6 +77,8 @@ def setup_data
end
end
+ invites[:emails].transform_values!{|v| v.first} # Drop the timestamp
+
nominated_by = {}
# might be more than one ...
ASF::Person.member_nominees.each do |k, v|