Prepare for syncing other mailinglists.

This commit is contained in:
Dominik Pantůček 2023-11-16 18:11:51 +01:00
parent 28fa8e45a9
commit fbe3f02128
2 changed files with 15 additions and 10 deletions

View file

@ -226,7 +226,7 @@
#f))
;; Load ML(s) and merge them
(define-values (MB1 internal-ml)
(define-values (MB1 internal-ml MLS)
(if MB0
(let ()
(define mls (load-mailman-lists))
@ -234,8 +234,9 @@
(mbase-merge-mailman mb ml))
MB0
mls)
(find-mailman-list mls "internal")))
(values #f #f)))
(find-mailman-list mls "internal")
MLS))
(values #f #f #f)))
;; Load DokuWiki users
(define MB (if MB1
@ -371,9 +372,10 @@
(newline)
(print-unpaired-table MB))
((mlsync)
(if (-normal-month-)
(mailman-sync-members internal-ml (mbase-active-emails MB #:suspended #t))
(print "Mailman synchronization disabled with manually specified current month.")))
(cond ((-normal-month-)
(mailman-sync-members internal-ml (mbase-active-emails MB #:suspended #t)))
(else
(print "Mailman synchronization disabled with manually specified current month."))))
((notify)
(let ((nmembers (members-to-notify MB (-notify-months-))))
(newline)

View file

@ -262,6 +262,7 @@
;; alphabetically
(define* (mbase-active-emails mb
#:active (active #t)
#:pred? (pred? #f)
#:suspended (suspended #f))
(sort
(filter
@ -272,10 +273,12 @@
(bdict-filter-values
(mbase-members mb)
(lambda (id mr)
(or (and active
(brmember-active? mr))
(and suspended
(brmember-suspended? mr)))))))
(and (or (not pred?)
(pred? mr))
(or (and active
(brmember-active? mr))
(and suspended
(brmember-suspended? mr))))))))
string-ci<?))
;; Merges given ML members into members base