From b3c9f213e5006ee42a93b09ea2f9bea52158ca46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sun, 28 May 2023 13:31:17 +0100 Subject: [PATCH] fix matrix-media-repo and update bridge configs --- config/services/mautrix-discord.nix | 33 ++++++++++++++-------------- config/services/mautrix-signal.nix | 9 ++++---- config/services/mautrix-telegram.nix | 29 ++++++++++-------------- config/services/mautrix-whatsapp.nix | 23 ++++++++++--------- flake.lock | 8 +++---- 5 files changed, 48 insertions(+), 54 deletions(-) diff --git a/config/services/mautrix-discord.nix b/config/services/mautrix-discord.nix index 3779dc41..b73f60ed 100644 --- a/config/services/mautrix-discord.nix +++ b/config/services/mautrix-discord.nix @@ -10,6 +10,7 @@ homeserver = { address = "https://matrix.chir.rs"; domain = "chir.rs"; + async_media = true; }; appservice = { database = { @@ -23,25 +24,14 @@ listen = "[::]:29321"; }; bridge = { + channel_name_template = "{{if or (eq .Type 3) (eq .Type 4)}}{{.Name}} ({{.GuildName}} — {{.ParentName}}){{else}}#{{.Name}} ({{.GuildName}} — {{.ParentName}}){{end}}"; + private_chat_portal_meta = "always"; startup_private_channel_create_limit = 25; delivery_receipts = true; - double_puppet_server_map = {}; - login_shared_secret_map = {}; - private_chat_portal_meta = true; sync_direct_chat_list = true; - delete_portal_on_channel_delete = true; - encryption = { - allow = true; - default = true; - require = false; - allow_key_sharing = true; - }; - permissions = { - "*" = "relay"; - "@lotte:chir.rs" = "admin"; - }; - channel_name_template = "{{if or (eq .Type 3) (eq .Type 4)}}{{.Name}} ({{.GuildName}} — {{.ParentName}}){{else}}#{{.Name}} ({{.GuildName}} — {{.ParentName}}){{end}}"; - + delete_portal_on_channel_delete = true; + prefix_webhook_messages = true; + cache_media = "always"; backfill = { forward_limits = { initial.dm = 50; @@ -51,6 +41,17 @@ missed.channel = -1; }; }; + encryption = { + allow = true; + default = true; + appservice = true; + allow_key_sharing = true; + }; + permissions = { + "*" = "relay"; + "@lotte:chir.rs" = "admin"; + }; + }; }; }; diff --git a/config/services/mautrix-signal.nix b/config/services/mautrix-signal.nix index a0a78c66..6bbf07b6 100644 --- a/config/services/mautrix-signal.nix +++ b/config/services/mautrix-signal.nix @@ -15,6 +15,7 @@ address = "https://matrix.chir.rs"; domain = "chir.rs"; http_retry_count = 1000; + async_media = true; }; appservice = { max_body_size = 10; @@ -32,20 +33,18 @@ bridge = { displayname_template = "{displayname}"; autocreate_contact_portal = true; - double_puppet_allow_discovery = true; - double_puppet_server_map = {}; - login_shared_secret_map = {}; + public_portals = true; sync_with_custom_puppets = true; + sync_direct_chat_list = true; encryption = { allow = true; + appservice = true; default = true; require = false; allow_key_sharing = true; }; - sync_direct_chat_list = true; private_chat_portal_meta = true; delivery_receipts = true; - delivery_error_reports = true; periodic_sync = 86400; permissions = { "*" = "relay"; diff --git a/config/services/mautrix-telegram.nix b/config/services/mautrix-telegram.nix index 2b148e99..a272b13b 100644 --- a/config/services/mautrix-telegram.nix +++ b/config/services/mautrix-telegram.nix @@ -10,6 +10,7 @@ address = "https://matrix.chir.rs"; domain = "chir.rs"; http_retry_count = 1000; + async_media = true; }; appservice = { address = "http://localhost:29317"; @@ -22,40 +23,34 @@ }; bridge = { displayname_template = "{displayname}"; - allow_avatar_remove = true; max_initial_member_sync = -1; - sync_create_limit = 0; - sync_direct_chats = true; - sync_direct_chat_list = true; - double_puppet_server_map = {}; - login_shared_secret_map = {}; - double_puppet_allow_discovery = true; - invite_link_resolve = true; - animated_sticker.target = "webm"; sync_channel_members = true; startup_sync = true; + sync_create_limit = 0; sync_deferred_create_all = true; + public_portals = true; sync_with_custom_puppets = true; + sync_direct_chat_list = true; + invite_link_resolve = true; encryption = { allow = true; + appservice = true; default = true; require = false; allow_key_sharing = true; }; - public_portals = true; - private_chat_portal_meta = true; - mute_bridging = true; + + private_chat_portal_meta = "aways"; + delivery_receipts = true; + pinned_tag = "m.favourite"; + archive_tag = "m.lowpriority"; + backfill = { msc2716 = true; normal_groups = true; unread_hours_threshold = -1; incremental.max_batches.supergroup = -1; }; - delivery_receipts = true; - delivery_error_reports = true; - incoming_bridge_error_reports = true; - pinned_tag = "m.favourite"; - archive_tag = "m.lowpriority"; permissions = { "*" = "relaybot"; "@lotte:chir.rs" = "admin"; diff --git a/config/services/mautrix-whatsapp.nix b/config/services/mautrix-whatsapp.nix index 5dd4fafd..ddd15f72 100644 --- a/config/services/mautrix-whatsapp.nix +++ b/config/services/mautrix-whatsapp.nix @@ -10,6 +10,7 @@ homeserver = { address = "https://matrix.chir.rs"; domain = "chir.rs"; + async_media = true; }; appservice = { database = { @@ -26,33 +27,31 @@ displayname_template = "{{if .PushName}}{{.PushName}}{{else if .BusinessName}}{{.BusinessName}}{{else}}{{.JID}}{{end}}"; personal_filtering_spaces = true; delivery_receipts = true; + message_error_notices = true; identity_change_notices = true; hystory_sync = { backfill = true; request_full_sync = true; }; - send_presence_on_typing = true; - double_puppet_server_map = {}; - login_shared_secret_map = {}; - private_chat_portal_meta = true; - mute_bridging = true; + user_avatar_sync = true; + sync_with_custom_puppets = true; + sync_direct_chat_list = true; + sync_manual_marked_unread = true; + private_chat_portal_meta = "always"; + parallel_member_sync = true; pinned_tag = "m.favourite"; archive_tag = "m.lowpriority"; allow_user_invite = true; - disappearing_messages_in_groups = true; url_previews = true; + extev_polls = true; + cross_room_replies = true; encryption = { allow = true; + appservice = true; default = true; require = false; allow_key_sharing = true; }; - sync_with_custom_puppets = true; - sync_manual_marked_unread = true; - force_active_delivery_receipts = true; - parallel_member_sync = true; - extev_polls = 2; - send_whatsapp_edits = true; permissions = { "*" = "relay"; "@lotte:chir.rs" = "admin"; diff --git a/flake.lock b/flake.lock index fa5a20bf..1ae39a9e 100644 --- a/flake.lock +++ b/flake.lock @@ -1284,11 +1284,11 @@ ] }, "locked": { - "lastModified": 1685256804, - "narHash": "sha256-lEb/rfbF68vn46EfnEUrcmfodmVaGBfgHUxiaHAkWmE=", + "lastModified": 1685273945, + "narHash": "sha256-uNRX9Qis09e0HVF2Fa+TAFc6gaSiYjoMt8xTUzYGpdg=", "ref": "main", - "rev": "99c84ea5cebc05b53b30d5550b6a6211f7ba4375", - "revCount": 863, + "rev": "24386426e0af89f2398de93e8f1b4f9946ab6cac", + "revCount": 865, "type": "git", "url": "https://git.chir.rs/darkkirb/nix-packages.git" },