Merge pull request #8 from kacperkwapisz/fix/mark-as-read-readonly

Fix emails marked as read despite mark_as_read: false
This commit is contained in:
0xK
2026-03-25 16:47:37 +01:00
committed by GitHub
+5 -1
View File
@@ -441,7 +441,11 @@ async def watch_folder(
client = None client = None
try: try:
client = await asyncio.to_thread(get_imap_client, account) client = await asyncio.to_thread(get_imap_client, account)
await asyncio.to_thread(client.select_folder, folder) await asyncio.to_thread(
client.select_folder,
folder,
readonly=not account.get("mark_as_read", False),
)
# Check IDLE support # Check IDLE support
if not client.has_capability("IDLE"): if not client.has_capability("IDLE"):