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 config options to drop invites matching certain criteria #530

Merged
merged 4 commits into from
Nov 18, 2022

Conversation

squahtx
Copy link
Contributor

@squahtx squahtx commented Nov 18, 2022

Add email.third_party_invite_homeserver_blocklist and
email.third_party_invite_room_blocklist config options to block
invites from a list of homeservers or for a list of rooms.

Add `email.third_party_invite_homeserver_blocklist` and
`email.third_party_invite_room_blocklist` config options to block
invites from a list of homeservers or for a list of rooms.
@squahtx squahtx requested a review from a team as a code owner November 18, 2022 15:21
)
self.third_party_invite_homeserver_blocklist = {
server
for server in third_party_invite_homeserver_blocklist.split("\n")
Copy link
Member

Choose a reason for hiding this comment

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

Can we insert newlines in the config?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, like so:

some_section.some_list_option =
        item1
        item2

I started with comma separated strings, but that looked unwieldy with long lists.

Copy link
Member

Choose a reason for hiding this comment

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

Cool!

@erikjohnston
Copy link
Member

This needs a changelog btw!

@squahtx squahtx requested a review from erikjohnston November 18, 2022 15:42
@erikjohnston erikjohnston enabled auto-merge (squash) November 18, 2022 16:05
@erikjohnston erikjohnston merged commit f3a5a80 into main Nov 18, 2022
@erikjohnston erikjohnston deleted the squah/add_invite_blocklist branch November 18, 2022 16:08
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