mirror of
https://github.com/element-hq/synapse
synced 2024-09-01 11:00:20 +00:00
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
This commit is contained in:
parent
15e8dd2ccc
commit
7f147d623b
1 changed files with 4 additions and 0 deletions
|
@ -66,6 +66,10 @@ class ResourceLimitsServerNotices(object):
|
||||||
if self._config.limit_usage_by_mau is False:
|
if self._config.limit_usage_by_mau is False:
|
||||||
return
|
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)
|
timestamp = yield self._store.user_last_seen_monthly_active(user_id)
|
||||||
if timestamp is None:
|
if timestamp is None:
|
||||||
# This user will be blocked from receiving the notice anyway.
|
# This user will be blocked from receiving the notice anyway.
|
||||||
|
|
Loading…
Reference in a new issue