Implement trail users

This commit is contained in:
Erik Johnston 2018-08-23 19:17:08 +01:00
parent 242a0483eb
commit cd77270a66
5 changed files with 44 additions and 2 deletions

View file

@ -201,6 +201,11 @@ class MonthlyActiveUsersStore(SQLBaseStore):
user_id(str): the user_id to query
"""
if self.hs.config.limit_usage_by_mau:
is_trial = yield self.is_trial_user(user_id)
if is_trial:
# we don't track trial users in the MAU table.
return
last_seen_timestamp = yield self.user_last_seen_monthly_active(user_id)
now = self.hs.get_clock().time_msec()