main
Bob Mottram 2024-01-17 20:25:13 +00:00
parent 6b8e620496
commit c66cfebacf
1 changed files with 5 additions and 0 deletions

View File

@ -2274,15 +2274,19 @@ def add_auto_cw(base_dir: str, nickname: str, domain: str,
and returns the new subject line and returns the new subject line
""" """
new_subject = subject new_subject = subject
print('add_auto_cw: subject ' + subject)
auto_cw_list = _load_auto_cw(base_dir, nickname, domain) auto_cw_list = _load_auto_cw(base_dir, nickname, domain)
for cw_rule in auto_cw_list: for cw_rule in auto_cw_list:
print('add_auto_cw: ' + cw_rule)
if '->' not in cw_rule: if '->' not in cw_rule:
continue continue
sections = cw_rule.split('->') sections = cw_rule.split('->')
rulematch = sections[0].strip() rulematch = sections[0].strip()
print('add_auto_cw: rulematch ' + rulematch + ' ' + content)
if rulematch not in content: if rulematch not in content:
continue continue
cw_str = sections[1].strip() cw_str = sections[1].strip()
print('add_auto_cw: cw_str ' + cw_str)
if not cw_str: if not cw_str:
continue continue
if new_subject: if new_subject:
@ -2290,4 +2294,5 @@ def add_auto_cw(base_dir: str, nickname: str, domain: str,
new_subject += ', ' + cw_str new_subject += ', ' + cw_str
else: else:
new_subject = cw_str new_subject = cw_str
print('add_auto_cw: new_subject ' + new_subject)
return new_subject return new_subject