Skip to content

Commit

Permalink
Fix KeyError on unbinding addresses (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 committed Sep 14, 2021
1 parent 40bb406 commit 2f5a3c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/397.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug introduced in v2.4.0 that caused association unbindings to fail with an Internal Server Error.
2 changes: 1 addition & 1 deletion sydent/threepid/bind.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def removeBinding(self, threepid: Dict[str, str], mxid: str) -> None:
"""

# ensure we are casefolding email addresses
threepid["address"] = normalise_address(threepid["address"], threepid["email"])
threepid["address"] = normalise_address(threepid["address"], threepid["medium"])

localAssocStore = LocalAssociationStore(self.sydent)
localAssocStore.removeAssociation(threepid, mxid)
Expand Down

0 comments on commit 2f5a3c5

Please sign in to comment.