mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-26 19:58:35 +02:00
thunderbird: do not rely on x-mozilla-status
For some reason, incoming messages are still set as "read".
This commit is contained in:
parent
1e67f3d0e8
commit
23d3b28d08
1 changed files with 1 additions and 4 deletions
|
@ -98,10 +98,7 @@ def notify_new_messages(path):
|
||||||
subject = parsed.get("subject")
|
subject = parsed.get("subject")
|
||||||
author = parsed.get("from")
|
author = parsed.get("from")
|
||||||
messageid = parsed.get("message-id")
|
messageid = parsed.get("message-id")
|
||||||
# https://vincent.bernat.ch/en/x-mozilla-status
|
if subject is not None and author is not None:
|
||||||
status = parsed.get("x-mozilla-status")
|
|
||||||
status = int(status) & 0x1 if status else 0
|
|
||||||
if subject is not None and author is not None and status == 0:
|
|
||||||
actions = [] if messageid is None else [messageid.strip("<>"), "Open"]
|
actions = [] if messageid is None else [messageid.strip("<>"), "Open"]
|
||||||
notify.Notify(
|
notify.Notify(
|
||||||
"Thunderbird",
|
"Thunderbird",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue