Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Update aliases event after deletion #652

Merged
merged 2 commits into from Mar 18, 2016

Conversation

Projects
None yet
2 participants
Owner

erikjohnston commented Mar 17, 2016

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.

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.
Contributor

NegativeMjark commented Mar 18, 2016

LGTM

@NegativeMjark NegativeMjark commented on the diff Mar 18, 2016

synapse/handlers/directory.py
@@ -93,7 +95,7 @@ def create_appservice_association(self, service, room_alias, room_id,
yield self._create_association(room_alias, room_id, servers)
@defer.inlineCallbacks
- def delete_association(self, user_id, room_alias):
+ def delete_association(self, requester, user_id, room_alias):
@NegativeMjark

NegativeMjark Mar 18, 2016

Contributor

Is the user_id different from the requester?

@erikjohnston

erikjohnston Mar 18, 2016

Owner

The requester is a separate type, which includes a user. Not sure why the functions in this module ask for both. I'm not even sure why the requester is needed.

erikjohnston added a commit that referenced this pull request Mar 18, 2016

Merge pull request #652 from matrix-org/erikj/delete_alias
Update aliases event after deletion

@erikjohnston erikjohnston merged commit 916227b into develop Mar 18, 2016

8 checks passed

Flake8 + Packaging (Commit) Build #159 origin/erikj/delete_alias succeeded in 27 sec
Details
Flake8 + Packaging (Merged PR) Build finished.
Details
Sytest Postgres (Commit) Build #162 origin/erikj/delete_alias succeeded in 5 min 31 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #163 origin/erikj/delete_alias succeeded in 4 min 21 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
Unit Tests (Commit) Build #204 origin/erikj/delete_alias succeeded in 1 min 19 sec
Details
Unit Tests (Merged PR) Build finished.
Details

@richvdh richvdh deleted the erikj/delete_alias branch Dec 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment