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

Make it possible to disable device registration from the config #153

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions mautrix_signal/commands/auth.py
Expand Up @@ -81,6 +81,7 @@ async def link(evt: CommandEvent) -> None:


@command_handler(needs_auth=False, management_only=True, help_section=SECTION_AUTH,
is_enabled_for=lambda evt: evt.config["signal.registration_enabled"],
help_text="Sign into Signal as the primary device", help_args="<phone>")
async def register(evt: CommandEvent) -> None:
if len(evt.args) == 0:
Expand Down
1 change: 1 addition & 0 deletions mautrix_signal/config.py
Expand Up @@ -53,6 +53,7 @@ def do_update(self, helper: ConfigUpdateHelper) -> None:
copy("signal.data_dir")
copy("signal.delete_unknown_accounts_on_start")
copy("signal.remove_file_after_handling")
copy("signal.registration_enabled")

copy("metrics.enabled")
copy("metrics.listen_port")
Expand Down
2 changes: 2 additions & 0 deletions mautrix_signal/example-config.yaml
Expand Up @@ -102,6 +102,8 @@ signal:
delete_unknown_accounts_on_start: false
# Whether or not message attachments should be removed from disk after they're bridged.
remove_file_after_handling: true
# Whether or not users can register a primary device
registration_enabled: true

# Bridge config
bridge:
Expand Down