mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-07-02 19:56:44 -04:00
prevent total number of reserved users being too large
This commit is contained in:
parent
e8eba2b4e3
commit
ef3589063a
1 changed files with 3 additions and 1 deletions
|
@ -39,7 +39,9 @@ class MonthlyActiveUsersStore(SQLBaseStore):
|
||||||
# TODO Why can't I do this in init?
|
# TODO Why can't I do this in init?
|
||||||
store = self.hs.get_datastore()
|
store = self.hs.get_datastore()
|
||||||
reserved_user_list = []
|
reserved_user_list = []
|
||||||
for tp in threepids:
|
|
||||||
|
# Do not add more reserved users than the total allowable number
|
||||||
|
for tp in threepids[:self.hs.config.max_mau_value]:
|
||||||
user_id = yield store.get_user_id_by_threepid(
|
user_id = yield store.get_user_id_by_threepid(
|
||||||
tp["medium"], tp["address"]
|
tp["medium"], tp["address"]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue