- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| LICENSE | ||
| README.md | ||
| sync-matrix.py | ||
sync-matrix.py
A python script that do the follow :
- login to your matrix account
- fetch matrix unread text messages from non-muted rooms
- send them in a mailbox
- set the receipt to the last event in selected rooms to they are considered read and notifications discarded
- logout of the matrix account (properly discarding the « unverified session »)
The only non-STL dependency is « dotenv », but it's not mandatory. If you have another way to set the config, like systemd service units, you can remove these two lines :
from dotenv import load_dotenv
load_dotenv("./.env")
The purpose is to allow an asynchrone use of matrix. Prioritary rooms and private chats have notifications enabled so that I can receive them on my phone. « Mentions only » rooms are considered less urgent so are read usually once in a day on my mailbox. Muted rooms are completely discarded.
In additions, I use my matrix server and account as a multiplexer for various IM services (whatsapp, discord, signal, irc...) with the absolutely awesome mautrix" bridges.
This workflow allow to remain reachable through these software a lot of people rely on while ignoring their awful and predatory UX design intended to trigger FOMO and maximize user retention.
Note : This script can't fetch encrypted messages, instead it will display if you have encrypted messages to read and will not send the receipt in encrypted rooms, so you'll see the notification next time you use your client.
Note 2 : I'm not 100% sure this work with other clients than Element and Element x. Any feedback welcomed.