mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-09-27 18:30:53 -04:00
Merge pull request #3276 from matrix-org/dbkr/unbind
Remove email addresses / phone numbers from ID servers when they're removed from synapse
This commit is contained in:
commit
187a546bff
6 changed files with 115 additions and 16 deletions
|
@ -381,9 +381,16 @@ class ThreepidDeleteRestServlet(RestServlet):
|
|||
requester = yield self.auth.get_user_by_req(request)
|
||||
user_id = requester.user.to_string()
|
||||
|
||||
yield self.auth_handler.delete_threepid(
|
||||
user_id, body['medium'], body['address']
|
||||
)
|
||||
try:
|
||||
yield self.auth_handler.delete_threepid(
|
||||
user_id, body['medium'], body['address']
|
||||
)
|
||||
except Exception:
|
||||
# NB. This endpoint should succeed if there is nothing to
|
||||
# delete, so it should only throw if something is wrong
|
||||
# that we ought to care about.
|
||||
logger.exception("Failed to remove threepid")
|
||||
raise SynapseError(500, "Failed to remove threepid")
|
||||
|
||||
defer.returnValue((200, {}))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue