mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-13 06:45:26 -04:00
Add module API callbacks for adding and deleting local 3PID associations (#15044
This commit is contained in:
parent
4fc8875876
commit
b40657314e
12 changed files with 324 additions and 48 deletions
|
@ -304,13 +304,20 @@ class UserRestServletV2(RestServlet):
|
|||
# remove old threepids
|
||||
for medium, address in del_threepids:
|
||||
try:
|
||||
await self.auth_handler.delete_threepid(
|
||||
user_id, medium, address, None
|
||||
# Attempt to remove any known bindings of this third-party ID
|
||||
# and user ID from identity servers.
|
||||
await self.hs.get_identity_handler().try_unbind_threepid(
|
||||
user_id, medium, address, id_server=None
|
||||
)
|
||||
except Exception:
|
||||
logger.exception("Failed to remove threepids")
|
||||
raise SynapseError(500, "Failed to remove threepids")
|
||||
|
||||
# Delete the local association of this user ID and third-party ID.
|
||||
await self.auth_handler.delete_local_threepid(
|
||||
user_id, medium, address
|
||||
)
|
||||
|
||||
# add new threepids
|
||||
current_time = self.hs.get_clock().time_msec()
|
||||
for medium, address in add_threepids:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue