Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix KeyError on unbinding addresses #397

Merged
merged 3 commits into from
Sep 13, 2021
Merged

Fix KeyError on unbinding addresses #397

merged 3 commits into from
Sep 13, 2021

Conversation

anoadragon453
Copy link
Member

There was a typo in the removeBinding function which seems to be causing unbindings to fail in Sydent.

The function normalise_address expects the medium to be passed as the second argument:

def normalise_address(address, medium):
if medium == "email":
return address.casefold()
else:
return address

Which in most cases would be "email". The code had threepid["email"] instead.

Introduced in #374.

@clokep
Copy link
Member

clokep commented Sep 13, 2021

Smells like we don't have tests for unbinding of addresses?

@anoadragon453
Copy link
Member Author

@clokep I think you may be correct! One should probably live in https://github.com/matrix-org/sydent/blob/main/tests/test_email.py.

I'll create a separate issue for adding some.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants