mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-23 05:00:24 +03:00
respond to review comments
This commit is contained in:
parent
df2833fadf
commit
f9e74ebfbd
1 changed files with 6 additions and 5 deletions
|
@ -88,7 +88,7 @@ class MonthlyActiveUsersStore(SQLBaseStore):
|
||||||
question_marks = ",".join("?" * len(reserved_users))
|
question_marks = ",".join("?" * len(reserved_users))
|
||||||
|
|
||||||
query_args.extend(reserved_users)
|
query_args.extend(reserved_users)
|
||||||
sql = base_sql + """ AND user_id NOT IN ({})""".format(question_marks)
|
sql = base_sql + " AND user_id NOT IN ({})".format(question_marks)
|
||||||
else:
|
else:
|
||||||
sql = base_sql
|
sql = base_sql
|
||||||
|
|
||||||
|
@ -133,7 +133,8 @@ class MonthlyActiveUsersStore(SQLBaseStore):
|
||||||
ORDER BY timestamp DESC
|
ORDER BY timestamp DESC
|
||||||
LIMIT ?
|
LIMIT ?
|
||||||
)
|
)
|
||||||
AND user_id NOT IN ({})""".format(
|
AND user_id NOT IN ({})
|
||||||
|
""".format(
|
||||||
question_marks, question_marks
|
question_marks, question_marks
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -182,9 +183,9 @@ class MonthlyActiveUsersStore(SQLBaseStore):
|
||||||
with registered users?
|
with registered users?
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Defered[tuple]: Real reserved users
|
Defered[list]: Real reserved users
|
||||||
"""
|
"""
|
||||||
users = ()
|
users = []
|
||||||
|
|
||||||
for tp in self.hs.config.mau_limits_reserved_threepids[
|
for tp in self.hs.config.mau_limits_reserved_threepids[
|
||||||
: self.hs.config.max_mau_value
|
: self.hs.config.max_mau_value
|
||||||
|
@ -193,7 +194,7 @@ class MonthlyActiveUsersStore(SQLBaseStore):
|
||||||
tp["medium"], tp["address"]
|
tp["medium"], tp["address"]
|
||||||
)
|
)
|
||||||
if user_id:
|
if user_id:
|
||||||
users = users + (user_id,)
|
users.append(user_id)
|
||||||
|
|
||||||
return users
|
return users
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue