summary refs log tree commit diff
path: root/synapse/rest/client/v1/directory.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-17 11:09:03 +0000
committerErik Johnston <erik@matrix.org>2016-03-17 11:42:00 +0000
commit2cd9260500efa82713edd365f54d491ac0328fb0 (patch)
tree632ceaa37ed1f843cc5d87c4d0a4373f6071727d /synapse/rest/client/v1/directory.py
parentMerge pull request #649 from matrix-org/dbkr/idempotent_registration (diff)
downloadsynapse-2cd9260500efa82713edd365f54d491ac0328fb0.tar.xz
Update aliases event after deletion
Attempt to update the appropriate `m.room.aliases` event after deleting
an alias. This may fail due to the deleter not being in the room.

Will also check if the canonical alias of the event is set to the
deleted alias, and if so will attempt to delete it.
Diffstat (limited to 'synapse/rest/client/v1/directory.py')
-rw-r--r--synapse/rest/client/v1/directory.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/directory.py b/synapse/rest/client/v1/directory.py
index 60c5ec77aa..59a23d6cb6 100644
--- a/synapse/rest/client/v1/directory.py
+++ b/synapse/rest/client/v1/directory.py
@@ -127,8 +127,9 @@ class ClientDirectoryServer(ClientV1RestServlet):
         room_alias = RoomAlias.from_string(room_alias)
 
         yield dir_handler.delete_association(
-            user.to_string(), room_alias
+            requester, user.to_string(), room_alias
         )
+
         logger.info(
             "User %s deleted alias %s",
             user.to_string(),