From f547e19dcc49320dff78a5258e52c825ecb07b22 Mon Sep 17 00:00:00 2001 From: Benjamin Blacher Date: Tue, 28 Oct 2025 12:33:11 +0100 Subject: [PATCH] Add support for some matrix-steam presence tracking vars --- .../matrix-bridge-steam/defaults/main.yml | 6 +++++ .../templates/config.yaml.j2 | 26 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/roles/custom/matrix-bridge-steam/defaults/main.yml b/roles/custom/matrix-bridge-steam/defaults/main.yml index cce9beda8..77e3ec2b7 100644 --- a/roles/custom/matrix-bridge-steam/defaults/main.yml +++ b/roles/custom/matrix-bridge-steam/defaults/main.yml @@ -34,6 +34,12 @@ matrix_steam_bridge_appservice_port: "8080" matrix_steam_bridge_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}" matrix_steam_bridge_self_sign_enabled: "{{ matrix_bridges_self_sign_enabled }}" +# matrix -> steam presence +matrix_steam_bridge_network_presence_enabled: true +# Default inactivity state +# This is what the bridge sets it's status to after some time of no user interaction +matrix_steam_bridge_network_presence_inactivity_status: 'invisible' + # A public address that external services can use to reach this appservice matrix_steam_bridge_appservice_public_address: "https://{{ matrix_server_fqn_matrix }}" diff --git a/roles/custom/matrix-bridge-steam/templates/config.yaml.j2 b/roles/custom/matrix-bridge-steam/templates/config.yaml.j2 index cd4473599..3704a6523 100644 --- a/roles/custom/matrix-bridge-steam/templates/config.yaml.j2 +++ b/roles/custom/matrix-bridge-steam/templates/config.yaml.j2 @@ -17,6 +17,32 @@ network: steam_bridge_auto_start: true steam_bridge_startup_timeout: 30 + # Presence synchronization settings + presence: + # Enable presence tracking from Matrix to Steam + # When enabled, your Steam status will automatically change based on + # your Matrix presence and activity + enabled: {{ matrix_steam_bridge_network_presence_enabled | to_json }} + + # Inactivity timeout in minutes before changing Steam status + # This is used as a fallback when your Matrix server doesn't support + # presence tracking. After this many minutes without Matrix activity, + # your Steam status will change (see inactivity_status below) + # Set to 0 to disable automatic away + inactivity_timeout: 15 + + # Status to set after inactivity timeout + # Valid values: "snooze" (appear away/idle) or "invisible" (appear offline) + inactivity_status: {{ matrix_steam_bridge_network_presence_inactivity_status | to_json }} + # Whether typing events in Matrix should reset the inactivity timer + # When true, typing will count as activity and keep you marked as online + typing_resets_presence: true + + # Whether sending read receipts in Matrix should reset the inactivity timer + # When true, reading messages will count as activity and keep you marked as online + read_receipts_reset_presence: false + + # Config options that affect the central bridge module. bridge: # The prefix for commands. Only required in non-management rooms.