mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 09:34:50 -04:00
Add a callback to react to 3PID associations (#12302)
This commit is contained in:
parent
34a8370d7b
commit
5e88143dff
6 changed files with 92 additions and 0 deletions
|
@ -211,6 +211,7 @@ class AuthHandler:
|
|||
self.macaroon_gen = hs.get_macaroon_generator()
|
||||
self._password_enabled = hs.config.auth.password_enabled
|
||||
self._password_localdb_enabled = hs.config.auth.password_localdb_enabled
|
||||
self._third_party_rules = hs.get_third_party_event_rules()
|
||||
|
||||
# Ratelimiter for failed auth during UIA. Uses same ratelimit config
|
||||
# as per `rc_login.failed_attempts`.
|
||||
|
@ -1505,6 +1506,8 @@ class AuthHandler:
|
|||
user_id, medium, address, validated_at, self.hs.get_clock().time_msec()
|
||||
)
|
||||
|
||||
await self._third_party_rules.on_threepid_bind(user_id, medium, address)
|
||||
|
||||
async def delete_threepid(
|
||||
self, user_id: str, medium: str, address: str, id_server: Optional[str] = None
|
||||
) -> bool:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue