-
-
Notifications
You must be signed in to change notification settings - Fork 175
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 bridge.filter.users
config option to configure filtering of direct chats
#892
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new field also needs to be added to the config upgrader in config.py, otherwise looks fine
Please test this before merging, I currently cannot test it on my machine due to me not having a development Synapse server (yet)... |
mautrix_telegram/config.py
Outdated
if "bridge.filter.users" not in self: | ||
base["bridge.filter.users"] = True | ||
else: | ||
copy("bridge.filter.users") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing fields are already handled by copy
if "bridge.filter.users" not in self: | |
base["bridge.filter.users"] = True | |
else: | |
copy("bridge.filter.users") | |
copy("bridge.filter.users") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it provide the correct default, though...?
Or does it just set it to None
?
Co-authored-by: Tulir Asokan <tulir@maunium.net>
bridge.filter.users
is "null", direct chats will follow the previous settings.bridge.filter.users
is "true", direct chats will always be bridged.bridge.filter.users
is "false", direct chats will never be bridged.Marked as draft as I did not test it locally.
Fixes #665.