summary refs log tree commit diff
path: root/synapse/handlers/auth.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@users.noreply.github.com>2016-12-21 09:51:04 +0000
committerGitHub <noreply@github.com>2016-12-21 09:51:04 +0000
commitbea15fb599ce3eed4e9bcb8340293b8ea9116db3 (patch)
tree6988c9b1b4f49e163df7fbfa21eadb87d97af8a3 /synapse/handlers/auth.py
parentMerge pull request #1712 from kyrias/fix-bind-address-none (diff)
parentAdd /account/3pid/delete endpoint (diff)
downloadsynapse-bea15fb599ce3eed4e9bcb8340293b8ea9116db3.tar.xz
Merge pull request #1714 from matrix-org/dbkr/delete_threepid
Add /account/3pid/delete endpoint
Diffstat (limited to '')
-rw-r--r--synapse/handlers/auth.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index 652efba455..ebadace4c1 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -617,6 +617,17 @@ class AuthHandler(BaseHandler):
             self.hs.get_clock().time_msec()
         )
 
+    @defer.inlineCallbacks
+    def delete_threepid(self, user_id, medium, address):
+        # 'Canonicalise' email addresses as per above
+        if medium == 'email':
+            address = address.lower()
+
+        ret = yield self.store.user_delete_threepid(
+            user_id, medium, address,
+        )
+        defer.returnValue(ret)
+
     def _save_session(self, session):
         # TODO: Persistent storage
         logger.debug("Saving session %s", session)