summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-08-14 17:43:22 +0100
committerNeil Johnson <neil@matrix.org>2018-08-14 17:43:22 +0100
commitb586b8b986fbeeb71eb864bd12b19c4b226535ab (patch)
tree269fe2cf7d8df454df32633ec025fbdb95a164d4 /synapse
parentfix off by 1 errors (diff)
parentMerge pull request #3692 from matrix-org/neil/fix_postgres_test_initialise_re... (diff)
downloadsynapse-b586b8b986fbeeb71eb864bd12b19c4b226535ab.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
Diffstat (limited to 'synapse')
-rw-r--r--synapse/api/auth.py3
-rw-r--r--synapse/storage/monthly_active_users.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index a9cc322d7e..108ea0ea09 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -780,7 +780,8 @@ class Auth(object):
         such as monthly active user limiting or global disable flag
 
         Args:
-            user_id(str): If present, checks for presence against existing MAU cohort
+            user_id(str|None): If present, checks for presence against existing
+            MAU cohort
         """
         if self.hs.config.hs_disabled:
             raise AuthError(
diff --git a/synapse/storage/monthly_active_users.py b/synapse/storage/monthly_active_users.py
index 7b36accdb6..7e417f811e 100644
--- a/synapse/storage/monthly_active_users.py
+++ b/synapse/storage/monthly_active_users.py
@@ -46,7 +46,7 @@ class MonthlyActiveUsersStore(SQLBaseStore):
                 tp["medium"], tp["address"]
             )
             if user_id:
-                self.upsert_monthly_active_user(user_id)
+                yield self.upsert_monthly_active_user(user_id)
                 reserved_user_list.append(user_id)
             else:
                 logger.warning(