mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 05:16:28 +03:00
feat: Don't mark messages as seen on IMAP if bcc_self=0 or bot=1
bcc_self=0 means that the user disabled it or it's a chatmail setup with the only device and w/o backups. If a backup is made someday, old messages not marked as IMAP-seen aren't a problem and new ones are marked as IMAP-seen. For bots, particularly multi-device ones (which are a rare case), probably no sane logic can be built on the "seen" message status. Moreover, if the user has additionally a bot that reads incoming messages, it doesn't mean that the user doesn't want to read them too.
This commit is contained in:
@@ -11,6 +11,7 @@ def test_moved_markseen(acfactory, direct_imap, log):
|
||||
|
||||
addr, password = acfactory.get_credentials()
|
||||
ac2 = acfactory.get_unconfigured_account()
|
||||
ac2.set_config("bcc_self", "1")
|
||||
ac2.add_or_update_transport({"addr": addr, "password": password})
|
||||
ac2.bring_online()
|
||||
|
||||
@@ -60,8 +61,8 @@ def test_markseen_message_and_mdn(acfactory, direct_imap):
|
||||
for ac in ac1, ac2:
|
||||
ac.set_config("delete_server_after", "0")
|
||||
|
||||
# Do not send BCC to self, we only want to test MDN on ac1.
|
||||
ac1.set_config("bcc_self", "0")
|
||||
# For ac1, we only want to test MDN.
|
||||
ac2.set_config("bcc_self", "1")
|
||||
|
||||
acfactory.get_accepted_chat(ac1, ac2).send_text("hi")
|
||||
msg = ac2.wait_for_incoming_msg()
|
||||
|
||||
@@ -79,7 +79,6 @@ def test_one_account_send_bcc_setting(acfactory, log, direct_imap):
|
||||
|
||||
# now make sure we are sending message to ourselves too
|
||||
assert self_addr in ev.msg
|
||||
assert self_addr in ev.msg
|
||||
|
||||
# BCC-self messages are marked as seen by the sender device.
|
||||
while True:
|
||||
|
||||
Reference in New Issue
Block a user