@@ -12,6 +12,9 @@ away, stop it (Ctrl-C) when you're back. That's the whole model.
1212- Never replies to your own messages (including its own prior replies).
1313- Sends at most one reply per sender per calendar day.
1414- Supports end-to-end encrypted DMs (which is most of them, by default).
15+ - Also sets your Matrix presence (default: "unavailable"/"Away") for as long
16+ as it runs, so you don't show as available just because the bot is
17+ connected and polling ` /sync ` .
1518
1619## 1. Create a dedicated login session for the bot
1720
@@ -76,7 +79,8 @@ cp config.example.yaml config.yaml
7679
7780Fill in ` homeserver ` , ` user_id ` , ` access_token ` , ` device_id ` , ` pickle_key ` ,
7881and (recommended) ` recovery_key ` . Adjust ` reply_message ` to whatever you
79- want people to see. ` config.yaml ` is gitignored - it holds secrets.
82+ want people to see, and ` presence ` if you don't want the default "Away"
83+ status (see below). ` config.yaml ` is gitignored - it holds secrets.
8084
8185## 5. Build & run
8286
@@ -176,6 +180,18 @@ Example: `"Hello {firstName}, I'm currently away and will get back to you as soo
176180Falls back to the username wherever a display name isn't known yet (e.g. the
177181bot hasn't seen their profile before their first message).
178182
183+ ## Presence
184+
185+ Every ` /sync ` request a client makes tells the homeserver ` set_presence ` ,
186+ and the Matrix spec's default for that is ` online ` - so a bot that's just
187+ connected and long-polling ` /sync ` , with no presence handling of its own,
188+ makes you show up as available to everyone the whole time it runs, no
189+ matter what the auto-reply says. This bot sets ` presence ` (default
190+ ` "unavailable" ` , shown as "Away" in most clients) on every sync request
191+ instead, so your status matches reality. Set it to ` "offline" ` to look
192+ fully offline, or ` "online" ` if you'd rather leave your real presence
193+ alone and rely on the auto-reply only.
194+
179195## How "one reply per sender per day" works
180196
181197` state.json ` maps each sender's user ID to the last calendar day (local
0 commit comments