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 0f7ead2d Gather list of mails that can view posts
0f7ead2d is described below

commit 0f7ead2df4bc5b09f5ff8a17d53ba4d530ba8fee
Author: Sebb <[email protected]>
AuthorDate: Mon Sep 2 23:38:42 2024 +0100

    Gather list of mails that can view posts
---
 lib/whimsy/asf/mlist.rb | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/whimsy/asf/mlist.rb b/lib/whimsy/asf/mlist.rb
index 1799fccb..05df093e 100644
--- a/lib/whimsy/asf/mlist.rb
+++ b/lib/whimsy/asf/mlist.rb
@@ -41,6 +41,18 @@ module ASF
       return list_filter('sub', 'apache.org', 'members-notify', archivers), 
File.mtime(LIST_TIME)
     end
 
+    # Intended for checking who sees emails on the list
+    def self.sub_digest(dom, list, archivers=false)
+      subs = list_filter('sub', dom, list, archivers)
+      digs = list_filter('digest', dom, list, archivers)
+      if subs.nil?
+        subs = digs # may also be nil
+      elsif !digs.nil? # i.e. neither nil, so merge
+        subs = (subs + digs).uniq
+      end
+      return subs, File.mtime(LIST_TIME)
+    end
+
     # Return an array of private@pmc subscribers (including digests) followed 
by the file update time
     # Returns nil if the subs file does not exist
     # By default does not return the standard archivers

Reply via email to