diff options
author | Erik Johnston <erik@matrix.org> | 2018-08-24 11:31:31 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-08-24 11:33:50 +0100 |
commit | 7f147d623b981644d22cd4db7db0e7baf33b0e2e (patch) | |
tree | 298dca01fb4c7869f67203776a6f6bf3f0cba3c2 /synapse | |
parent | Merge pull request #3749 from matrix-org/erikj/add_trial_users (diff) | |
download | synapse-7f147d623b981644d22cd4db7db0e7baf33b0e2e.tar.xz |
Fix bug where we broke sync when using limit_usage_by_mau
We assumed that we always had service notices configured, but that is not always true
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/server_notices/resource_limits_server_notices.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/server_notices/resource_limits_server_notices.py b/synapse/server_notices/resource_limits_server_notices.py index 96eb97771f..98495ddbf9 100644 --- a/synapse/server_notices/resource_limits_server_notices.py +++ b/synapse/server_notices/resource_limits_server_notices.py @@ -66,6 +66,10 @@ class ResourceLimitsServerNotices(object): if self._config.limit_usage_by_mau is False: return + if not self._server_notices_manager.is_enabled(): + # Don't try and send server notices unles they've been enabled + return + timestamp = yield self._store.user_last_seen_monthly_active(user_id) if timestamp is None: # This user will be blocked from receiving the notice anyway. |