mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 17:55:26 -04:00
fix: reply-all Cc's the user's own other addresses (multi-account) (#672)
* feat: publish all configured email addresses for reply-all exclusion * fix: exclude all of the user's own addresses from reply-all, not just the active one * test: reply-all excludes all of the user's configured addresses
This commit is contained in:
@@ -51,3 +51,16 @@ def test_reply_all_excludes_only_self_exactly():
|
||||
cc = json.loads(_run(js))
|
||||
# Our own address is dropped; a substring-similar address is kept.
|
||||
assert cc == "Alice <alice@x.com>, bob@x.com"
|
||||
|
||||
|
||||
@pytest.mark.skipif(not _HAS_NODE, reason="node binary not on PATH")
|
||||
def test_reply_all_excludes_all_of_my_addresses():
|
||||
# Multi-account user: every one of their own addresses must be excluded,
|
||||
# not just the active one.
|
||||
data = {"to": "Alice <alice@x.com>, me@work.com", "cc": "me@personal.com, bob@x.com"}
|
||||
js = f"""
|
||||
import {{ buildReplyAllCc }} from '{_HELPER.as_posix()}';
|
||||
console.log(JSON.stringify(buildReplyAllCc({json.dumps(data)}, ["me@work.com", "me@personal.com"])));
|
||||
"""
|
||||
cc = json.loads(_run(js))
|
||||
assert cc == "Alice <alice@x.com>, bob@x.com"
|
||||
|
||||
Reference in New Issue
Block a user