From b49f4531e8ba6f8023ab019eb421fdbc804db669 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Fri, 5 Oct 2018 10:32:43 +0300 Subject: [PATCH] Make user presence-status tracking configurable --- CHANGELOG.md | 9 +++++++++ roles/matrix-server/defaults/main.yml | 5 +++++ roles/matrix-server/templates/synapse/homeserver.yaml.j2 | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e3bd14e..efe376bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# 2018-10-05 + +## Presence tracking made configurable + +The playbook can now enable/disable user presence-status tracking in Synapse, through the playbook's `matrix_synapse_use_presence` variable (having a default value of `true` - enabled). + +If users participate in large rooms with many other servers, disabling presence will decrease server load significantly. + + # 2018-09-27 ## Synapse Cache Factor made configurable diff --git a/roles/matrix-server/defaults/main.yml b/roles/matrix-server/defaults/main.yml index ab19be38..a154b424 100644 --- a/roles/matrix-server/defaults/main.yml +++ b/roles/matrix-server/defaults/main.yml @@ -68,6 +68,11 @@ matrix_synapse_rc_message_burst_count: 10.0 # (things like number of users, number of messages sent, uptime, load, etc.) matrix_synapse_report_stats: false +# Controls whether the Matrix server will track presence status (online, offline, unavailable) for users. +# If users participate in large rooms with many other servers, +# disabling this will decrease server load significantly. +matrix_synapse_use_presence: true + # Controls password-peppering for Matrix Synapse. Not to be changed after initial setup. matrix_synapse_password_config_pepper: "" diff --git a/roles/matrix-server/templates/synapse/homeserver.yaml.j2 b/roles/matrix-server/templates/synapse/homeserver.yaml.j2 index 279fe1aa..5bbd86bb 100644 --- a/roles/matrix-server/templates/synapse/homeserver.yaml.j2 +++ b/roles/matrix-server/templates/synapse/homeserver.yaml.j2 @@ -96,7 +96,7 @@ public_baseurl: https://{{ hostname_matrix }}/ soft_file_limit: 0 # Set to false to disable presence tracking on this homeserver. -use_presence: true +use_presence: {{ matrix_synapse_use_presence|to_yaml }} # The GC threshold parameters to pass to `gc.set_threshold`, if defined # gc_thresholds: [700, 10, 10]