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

Add a config option to disable deleting tokens on bind #293

Merged
merged 6 commits into from
May 20, 2020

Conversation

babolivier
Copy link
Contributor

#174 introduced an automatic deletion process for 3PID invite tokens, along with their metadata, upon a successful delivery of these tokens to a homeserver following a bind of the invited 3PID.

Some admins would like to be able to keep these invites in the database to investigate issues or for audit purposes. This PR introduces a delete_tokens_on_bind which, if false, skip that deletion step. It defaults to true, in order to default to a more privacy-respectful behaviour.

We don't have to care about delivered invites getting in the way and being redelivered, since #165 takes care of filtering them out.

@babolivier babolivier requested a review from a team May 19, 2020 09:27
@babolivier babolivier force-pushed the babolivier/delete_config branch from 7a1180a to 0fcbe86 Compare May 19, 2020 09:28
@babolivier babolivier removed the request for review from a team May 19, 2020 10:29
@babolivier babolivier force-pushed the babolivier/delete_config branch from 5f19af8 to 70975a2 Compare May 19, 2020 10:30
This is to avoid editing the defaults directly rather than the copy.
@babolivier babolivier requested a review from a team May 19, 2020 15:37
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple of things

sydent/sydent.py Show resolved Hide resolved
tests/test_invites.py Outdated Show resolved Hide resolved
@babolivier babolivier requested a review from richvdh May 20, 2020 10:32
tests/test_invites.py Outdated Show resolved Hide resolved
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

…kens

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
@babolivier babolivier merged commit 97f8d31 into master May 20, 2020
@babolivier babolivier deleted the babolivier/delete_config branch May 20, 2020 10:51
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