summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-08-24 10:10:58 +0100
committerGitHub <noreply@github.com>2018-08-24 10:10:58 +0100
commit15e8dd2ccce14cdb66dd8eaf4580290aa3c486dd (patch)
tree3feefe9c0037c421a43d862ef8699758b6cf998b /synapse/api/auth.py
parentMerge pull request #3747 from matrix-org/erikj/fix_multiple_sends_notice (diff)
parentNewsfile (diff)
downloadsynapse-15e8dd2ccce14cdb66dd8eaf4580290aa3c486dd.tar.xz
Merge pull request #3749 from matrix-org/erikj/add_trial_users
Implement trial users
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 4ca40a0f71..8d2aa5870a 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -797,11 +797,15 @@ class Auth(object):
                 limit_type=self.hs.config.hs_disabled_limit_type
             )
         if self.hs.config.limit_usage_by_mau is True:
-            # If the user is already part of the MAU cohort
+            # If the user is already part of the MAU cohort or a trial user
             if user_id:
                 timestamp = yield self.store.user_last_seen_monthly_active(user_id)
                 if timestamp:
                     return
+
+                is_trial = yield self.store.is_trial_user(user_id)
+                if is_trial:
+                    return
             # Else if there is no room in the MAU bucket, bail
             current_mau = yield self.store.get_monthly_active_count()
             if current_mau >= self.hs.config.max_mau_value: