mirror of
https://mau.dev/maunium/synapse.git
synced 2024-09-02 23:52:00 +00:00
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
This commit is contained in:
commit
b586b8b986
1
changelog.d/3692.bugfix
Normal file
1
changelog.d/3692.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix missing yield in synapse.storage.monthly_active_users.initialise_reserved_users
|
@ -780,7 +780,8 @@ class Auth(object):
|
|||||||
such as monthly active user limiting or global disable flag
|
such as monthly active user limiting or global disable flag
|
||||||
|
|
||||||
Args:
|
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:
|
if self.hs.config.hs_disabled:
|
||||||
raise AuthError(
|
raise AuthError(
|
||||||
|
@ -46,7 +46,7 @@ class MonthlyActiveUsersStore(SQLBaseStore):
|
|||||||
tp["medium"], tp["address"]
|
tp["medium"], tp["address"]
|
||||||
)
|
)
|
||||||
if user_id:
|
if user_id:
|
||||||
self.upsert_monthly_active_user(user_id)
|
yield self.upsert_monthly_active_user(user_id)
|
||||||
reserved_user_list.append(user_id)
|
reserved_user_list.append(user_id)
|
||||||
else:
|
else:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
|
@ -29,7 +29,7 @@ class SyncTestCase(tests.unittest.TestCase):
|
|||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.hs = yield setup_test_homeserver()
|
self.hs = yield setup_test_homeserver(self.addCleanup)
|
||||||
self.sync_handler = SyncHandler(self.hs)
|
self.sync_handler = SyncHandler(self.hs)
|
||||||
self.store = self.hs.get_datastore()
|
self.store = self.hs.get_datastore()
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ class MonthlyActiveUsersTestCase(tests.unittest.TestCase):
|
|||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def test_initialise_reserved_users(self):
|
def test_initialise_reserved_users(self):
|
||||||
|
self.hs.config.max_mau_value = 5
|
||||||
user1 = "@user1:server"
|
user1 = "@user1:server"
|
||||||
user1_email = "user1@matrix.org"
|
user1_email = "user1@matrix.org"
|
||||||
user2 = "@user2:server"
|
user2 = "@user2:server"
|
||||||
|
Loading…
Reference in New Issue
Block a user