summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-09-06 17:22:53 +0100
committerNeil Johnson <neil@matrix.org>2018-09-06 17:22:53 +0100
commit84a750e0c36f653b71a06c564154f257c1b7dee3 (patch)
tree60b82bcc541df570b7e1cca4a65cdfe16a6b6ec0 /synapse/storage
parenttowncrier (diff)
downloadsynapse-84a750e0c36f653b71a06c564154f257c1b7dee3.tar.xz
ensure guests never enter mau list
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/monthly_active_users.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/storage/monthly_active_users.py b/synapse/storage/monthly_active_users.py

index e34e16c079..b890c152db 100644 --- a/synapse/storage/monthly_active_users.py +++ b/synapse/storage/monthly_active_users.py
@@ -192,7 +192,7 @@ class MonthlyActiveUsersStore(SQLBaseStore): )) @defer.inlineCallbacks - def populate_monthly_active_users(self, user_id, is_guest=False): + def populate_monthly_active_users(self, user_id): """Checks on the state of monthly active user limits and optionally add the user to the monthly active tables @@ -201,13 +201,12 @@ class MonthlyActiveUsersStore(SQLBaseStore): """ if self.hs.config.limit_usage_by_mau: - # Guests should not be included as part of MAU group + # Trial users and guests should not be included as part of MAU group + is_guest = yield self.is_guest(user_id) if is_guest: return - is_trial = yield self.is_trial_user(user_id) if is_trial: - # we don't track trial users in the MAU table. return last_seen_timestamp = yield self.user_last_seen_monthly_active(user_id)