From 8d789fbba3041330551d944eeca3013055b33442 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Wed, 1 Dec 2021 19:09:52 +0100 Subject: [PATCH] Rework mautrix-whatsapp config for 0.2 Many of the options are the default and some of them got renamed. --- .../services/matrix/mautrix-whatsapp.nix | 30 +++++-------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/machines/fuuko/services/matrix/mautrix-whatsapp.nix b/machines/fuuko/services/matrix/mautrix-whatsapp.nix index 2df32f7..7a7a01f 100644 --- a/machines/fuuko/services/matrix/mautrix-whatsapp.nix +++ b/machines/fuuko/services/matrix/mautrix-whatsapp.nix @@ -30,36 +30,21 @@ let os_name = "Mautrix-WhatsApp bridge"; }; bridge = { - chat_list_wait = 30; command_prefix = "!wa"; - connection_retry_delay = -1; - connection_timeout = 20; delivery_receipts = true; - displayname_template = "{{if .Name}}{{.Name}}{{else if .Notify}}{{.Notify}}{{else}}{{.Jid}}{{end}} (WA)"; - fetch_message_on_timeout = true; - initial_chat_sync_count = 10; - initial_history_fill_count = 20; - invite_own_puppet_for_backfilling = true; - login_qr_regen_count = 2; - max_connection_attempts = 12; - portal_sync_wait = 600; - private_chat_portal_meta = true; - recovery_chat_sync_count = -1; - recovery_history_backfill = true; - relaybot.enabled = false; - report_connection_retry = true; - sync_max_chat_age = 259200; - sync_with_custom_puppets = true; - username_template = "whatsapp_{{.}}"; - call_notices = { - start = true; - end = true; + displayname_template = "{{if .FullName}}{{.FullName}}{{else if .Notify}}{{.Notify}}{{else}}{{.Jid}}{{end}} (WA)"; + history_sync = { + backfill = true; }; + identity_change_notices = true; permissions = { # Only one user since using the name from the address book does not # work with multiple users "@simon:${homeserver.domain}" = 100; }; + private_chat_portal_meta = true; + reaction_notices = true; + relay.enable = false; }; logging.print_level = "info"; }; @@ -83,6 +68,7 @@ in serviceConfig = { DynamicUser = true; StateDirectory = "mautrix-whatsapp"; + WorkingDirectory = "/var/lib/mautrix-whatsapp"; ExecStart = "${pkgs.mautrix-whatsapp}/bin/mautrix-whatsapp -c ${generatedConfig}/config.yaml"; Restart = "on-failure"; };