mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 23:15:02 -04:00
Ensure emails are canonicalized before fetching associated user. (#11547)
This should fix pushers with an email in non-canonical form is used as the pushkey.
This commit is contained in:
parent
3b8872299a
commit
9562f0c2f1
5 changed files with 11 additions and 4 deletions
|
@ -18,6 +18,7 @@ from synapse.metrics.background_process_metrics import wrap_as_background_proces
|
|||
from synapse.storage._base import SQLBaseStore
|
||||
from synapse.storage.database import DatabasePool, make_in_list_sql_clause
|
||||
from synapse.util.caches.descriptors import cached
|
||||
from synapse.util.threepids import canonicalise_email
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from synapse.server import HomeServer
|
||||
|
@ -103,7 +104,7 @@ class MonthlyActiveUsersWorkerStore(SQLBaseStore):
|
|||
: self.hs.config.server.max_mau_value
|
||||
]:
|
||||
user_id = await self.hs.get_datastore().get_user_id_by_threepid(
|
||||
tp["medium"], tp["address"]
|
||||
tp["medium"], canonicalise_email(tp["address"])
|
||||
)
|
||||
if user_id:
|
||||
users.append(user_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue