diff --git a/mautrix-signal/Chart.yaml b/mautrix-signal/Chart.yaml index 9c89e70..b1ce738 100644 --- a/mautrix-signal/Chart.yaml +++ b/mautrix-signal/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: mautrix-signal description: A Matrix-Signal puppeting bridge. type: application -version: 0.0.8 +version: 0.0.9 # renovate: image=dock.mau.dev/mautrix/signal appVersion: "0.7.0" maintainers: diff --git a/mautrix-signal/README.adoc b/mautrix-signal/README.adoc index 9d8f746..61370c8 100644 --- a/mautrix-signal/README.adoc +++ b/mautrix-signal/README.adoc @@ -2,7 +2,7 @@ = mautrix-signal -image::https://img.shields.io/badge/Version-0.0.8-informational?style=flat-square[Version: 0.0.8] +image::https://img.shields.io/badge/Version-0.0.9-informational?style=flat-square[Version: 0.0.9] image::https://img.shields.io/badge/Version-application-informational?style=flat-square[Type: application] image::https://img.shields.io/badge/AppVersion-0.7.0-informational?style=flat-square[AppVersion: 0.7.0] == Maintainers @@ -153,102 +153,102 @@ helm uninstall mautrix-signal-release | config.backfill.enabled | bool | `false` -| +| Whether to do backfilling at all. | config.backfill.max_catchup_messages -| string -| `nil` -| +| int +| `500` +| Maximum number of missed messages to backfill after bridge restarts. | config.backfill.max_initial_messages -| string -| `nil` -| +| int +| `50` +| Maximum number of messages to backfill in empty rooms. | config.backfill.queue.batch_delay -| string -| `nil` -| +| int +| `20` +| Delay between batches in seconds. | config.backfill.queue.batch_size -| string -| `nil` -| +| int +| `100` +| Number of messages to backfill in one batch. | config.backfill.queue.enabled -| string -| `nil` -| +| bool +| `false` +| Should the backfill queue be enabled? | config.backfill.queue.max_batches | int -| `10` -| +| `-1` +| Maximum number of batches to backfill per portal. If set to -1, all available messages will be backfilled. -| config.backfill.queue.max_batches_override.a -| int -| `10` -| +| config.backfill.queue.max_batches_override +| object +| `{}` +| Optional network-specific overrides for max batches. Interpretation of this field depends on the network connector. | config.backfill.threads.max_initial_messages -| string -| `nil` -| +| int +| `50` +| Maximum number of messages to backfill in a new thread. | config.backfill.unread_hours_threshold -| string -| `nil` -| +| int +| `720` +| If a backfilled chat is older than this number of hours, mark it as read even if it's unread on the remote network. | config.bridge.bridge_matrix_leave -| string -| `nil` -| +| bool +| `false` +| Should leaving Matrix rooms be bridged as leaving groups on the remote network? | config.bridge.cleanup_on_logout.bad_credentials.private | string -| `nil` +| `"nothing"` | | config.bridge.cleanup_on_logout.bad_credentials.relayed | string -| `nil` +| `"nothing"` | | config.bridge.cleanup_on_logout.bad_credentials.shared_has_users | string -| `nil` +| `"nothing"` | | config.bridge.cleanup_on_logout.bad_credentials.shared_no_users | string -| `nil` +| `"nothing"` | | config.bridge.cleanup_on_logout.enabled -| string -| `nil` -| +| bool +| `false` +| Should cleanup on logout be enabled at all? | config.bridge.cleanup_on_logout.manual.private | string -| `nil` -| +| `"nothing"` +| Action for private portals which will never be shared with other Matrix users. | config.bridge.cleanup_on_logout.manual.relayed | string -| `nil` -| +| `"nothing"` +| Action for portals with a relay user configured. | config.bridge.cleanup_on_logout.manual.shared_has_users | string -| `nil` -| +| `"nothing"` +| Action for portals which have other logged-in Matrix users. | config.bridge.cleanup_on_logout.manual.shared_no_users | string -| `nil` -| +| `"nothing"` +| Action for portals which may be shared, but don't currently have any other Matrix users. | config.bridge.command_prefix | string @@ -256,34 +256,24 @@ helm uninstall mautrix-signal-release | The prefix for commands. Only required in non-management rooms. | config.bridge.mute_only_on_create -| string -| `nil` -| +| bool +| `true` +| Should room mute status only be synced when creating the portal? Like tags, mutes can't currently be synced back to the remote network. -| config.bridge.permissions."@admin:example.com" -| string -| `"admin"` -| - -| config.bridge.permissions."example.com" -| string -| `"user"` -| - -| config.bridge.permissions.* -| string -| `"relay"` -| +| config.bridge.permissions +| object +| `{"*":"relay","@admin:example.com":"admin","example.com":"user"}` +| Permissions for using the bridge. Permitted values: relay - Talk through the relaybot (if enabled), no access otherwise commands - Access to use commands in the bridge, but not login. user - Access to use the bridge with puppeting. admin - Full access, user level with some additional administration tools. Permitted keys: * - All Matrix users domain - All users on that homeserver mxid - Specific user | config.bridge.personal_filtering_spaces | bool -| `false` -| Should the bridge create a space for each logged-in user and add bridged rooms to it? Users who logged in before turning this on should run `!signal sync-space` to create and fill the space for the first time. +| `true` +| Should the bridge create a space for each login containing the rooms that account is in? | config.bridge.private_chat_portal_meta -| string -| `"default"` -| Whether to explicitly set the avatar and room name for private chat portal rooms. If set to `default`, this will be enabled in encrypted rooms and disabled in unencrypted rooms. If set to `always`, all DM rooms will have explicit names and avatars set. If set to `never`, DM rooms will never have names and avatars set. +| bool +| `false` +| Whether the bridge should set names and avatars explicitly for DM portals. This is only necessary when using clients that don't support MSC4171. | config.bridge.relay.admin_only | bool @@ -291,14 +281,14 @@ helm uninstall mautrix-signal-release | Should only admins be allowed to set themselves as relay users? | config.bridge.relay.default_relays -| string -| `nil` -| +| list +| `[]` +| List of user login IDs which anyone can set as a relay, as long as the relay user is in the room. | config.bridge.relay.displayname_format | string -| `""` -| +| `"{{ .DisambiguatedName }}"` +| For networks that support per-message displaynames (i.e. Slack and Discord), the template for those names. This has all the Sender variables available under message_formats (but without the .Sender prefix). Note that you need to manually remove the displayname from message_formats above. | config.bridge.relay.enabled | bool @@ -307,13 +297,13 @@ helm uninstall mautrix-signal-release | config.bridge.relay.message_formats | object -| `{"m.audio":"{{ .Sender.Displayname }} sent an audio file","m.emote":"* {{ .Sender.Displayname }} {{ .Message }}","m.file":"{{ .Sender.Displayname }} sent a file","m.image":"{{ .Sender.Displayname }} sent an image","m.location":"{{ .Sender.Displayname }} sent a location","m.notice":"{{ .Sender.Displayname }}: {{ .Message }}","m.text":"{{ .Sender.Displayname }}: {{ .Message }}","m.video":"{{ .Sender.Displayname }} sent a video"}` -| The formats to use when sending messages to Signal via the relaybot. +| `{"m.audio":"{{ .Sender.DisambiguatedName }} sent an audio file{{ if .Caption }}: {{ .Caption }}{{ end }}","m.emote":"* {{ .Sender.DisambiguatedName }} {{ .Message }}","m.file":"{{ .Sender.DisambiguatedName }} sent a file{{ if .Caption }}: {{ .Caption }}{{ end }}","m.image":"{{ .Sender.DisambiguatedName }} sent an image{{ if .Caption }}: {{ .Caption }}{{ end }}","m.location":"{{ .Sender.DisambiguatedName }} sent a location{{ if .Caption }}: {{ .Caption }}{{ end }}","m.notice":"{{ .Sender.DisambiguatedName }}: {{ .Message }}","m.text":"{{ .Sender.DisambiguatedName }}: {{ .Message }}","m.video":"{{ .Sender.DisambiguatedName }} sent a video{{ if .Caption }}: {{ .Caption }}{{ end }}"}` +| The formats to use when sending messages via the relaybot. Available variables: .Sender.UserID - The Matrix user ID of the sender. .Sender.Displayname - The display name of the sender (if set). .Sender.RequiresDisambiguation - Whether the sender's name may be confused with the name of another user in the room. .Sender.DisambiguatedName - The disambiguated name of the sender. This will be the displayname if set, plus the user ID in parentheses if the displayname is not unique. If the displayname is not set, this is just the user ID. .Message - The `formatted_body` field of the message. .Caption - The `formatted_body` field of the message, if it's a caption. Otherwise an empty string. .FileName - The name of the file being sent. | config.bridge.tag_only_on_create -| string -| `nil` -| +| bool +| `true` +| Should room tags only be synced when creating the portal? Tags mean things like favorite/pin and archive/low priority. Tags currently can't be synced back to the remote network, so a continuous sync means tagging from Matrix will be undone. | config.database.max_conn_idle_time | string @@ -347,48 +337,48 @@ helm uninstall mautrix-signal-release | config.direct_media.allow_proxy | bool -| `false` -| +| `true` +| If the remote network supports media downloads over HTTP, then the bridge will use MSC3860/MSC3916 media download redirects if the requester supports it. Optionally, you can force redirects and not allow proxying at all by setting this to false. This option does nothing if the remote network does not support media downloads over HTTP. | config.direct_media.enabled | bool | `false` -| +| Should custom mxc:// URIs be used instead of reuploading media? | config.direct_media.media_id_prefix | string -| `""` -| +| `nil` +| Optionally specify a custom prefix for the media ID part of the MXC URI. | config.direct_media.server_key | string | `""` -| +| Matrix server signing key to make the federation tester pass, same format as synapse's .signing.key file. This key is also used to sign the mxc:// URIs to ensure only the bridge can generate them. | config.direct_media.server_name | string -| `""` -| +| `"discord-media.example.com"` +| The server name to use for the custom mxc:// URIs. This server name will effectively be a real Matrix server, it just won't implement anything other than media. You must either set up .well-known delegation from this domain to the bridge, or proxy the domain directly to the bridge. | config.direct_media.well_known_response | string -| `""` -| +| `nil` +| Optionally a custom .well-known response. This defaults to `server_name:443` | config.double_puppet.allow_discovery | bool | `false` -| Allow using double puppeting from any server with a valid client .well-known file. +| Whether to allow client API URL discovery for other servers. When using this option, users on other servers can use double puppeting even if their server URLs aren't explicitly added to the servers map above. | config.double_puppet.secrets | object -| `{"example.com":"foobar"}` -| Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth If set, double puppeting will be enabled automatically for local users instead of users having to find an access token and run `login-matrix` manually. +| `{"example.com":"as_token:foobar"}` +| Shared secrets for automatic double puppeting. See https://docs.mau.fi/bridges/general/double-puppeting.html for instructions. | config.double_puppet.servers | object | `{"example.com":"https://example.com"}` -| Servers to always allow double puppeting from +| Servers to always allow double puppeting from. This is only for other servers and should NOT contain the server the bridge is on. | config.encryption.allow | bool @@ -643,22 +633,22 @@ helm uninstall mautrix-signal-release | config.public_media.enabled | bool | `false` -| +| Should public media be enabled at all? The public_address field under the appservice section MUST be set when enabling public media. | config.public_media.expiry | int | `0` -| +| Number of seconds that public media URLs are valid for. If set to 0, URLs will never expire. | config.public_media.hash_length | int -| `0` -| +| `32` +| Length of hash to use for public media URLs. Must be between 0 and 32. | config.public_media.signing_key | string -| `""` -| +| `"generate"` +| A key for signing public media URLs. If set to "generate", a random key will be generated. | config.signal.device_name | string diff --git a/mautrix-signal/values.yaml b/mautrix-signal/values.yaml index 3300993..67e1347 100644 --- a/mautrix-signal/values.yaml +++ b/mautrix-signal/values.yaml @@ -23,29 +23,47 @@ config: bridge: # -- The prefix for commands. Only required in non-management rooms. command_prefix: '!signal' - # -- Should the bridge create a space for each logged-in user and add bridged rooms to it? - # Users who logged in before turning this on should run `!signal sync-space` to create and fill the space for the first time. - personal_filtering_spaces: false - # -- Whether to explicitly set the avatar and room name for private chat portal rooms. - # If set to `default`, this will be enabled in encrypted rooms and disabled in unencrypted rooms. - # If set to `always`, all DM rooms will have explicit names and avatars set. - # If set to `never`, DM rooms will never have names and avatars set. - private_chat_portal_meta: default - bridge_matrix_leave: - tag_only_on_create: - mute_only_on_create: + # -- Should the bridge create a space for each login containing the rooms that account is in? + personal_filtering_spaces: true + # -- Whether the bridge should set names and avatars explicitly for DM portals. + # This is only necessary when using clients that don't support MSC4171. + private_chat_portal_meta: false + + # -- Should leaving Matrix rooms be bridged as leaving groups on the remote network? + bridge_matrix_leave: false + # -- Should room tags only be synced when creating the portal? Tags mean things like favorite/pin and archive/low priority. + # Tags currently can't be synced back to the remote network, so a continuous sync means tagging from Matrix will be undone. + tag_only_on_create: true + # -- Should room mute status only be synced when creating the portal? + # Like tags, mutes can't currently be synced back to the remote network. + mute_only_on_create: true + + # What should be done to portal rooms when a user logs out or is logged out? + # Permitted values: + # nothing - Do nothing, let the user stay in the portals + # kick - Remove the user from the portal rooms, but don't delete them + # unbridge - Remove all ghosts in the room and disassociate it from the remote chat + # delete - Remove all ghosts and users from the room (i.e. delete it) cleanup_on_logout: - enabled: + # -- Should cleanup on logout be enabled at all? + enabled: false + # Settings for manual logouts (explicitly initiated by the Matrix user) manual: - private: - relayed: - shared_no_users: - shared_has_users: + # -- Action for private portals which will never be shared with other Matrix users. + private: nothing + # -- Action for portals with a relay user configured. + relayed: nothing + # -- Action for portals which may be shared, but don't currently have any other Matrix users. + shared_no_users: nothing + # -- Action for portals which have other logged-in Matrix users. + shared_has_users: nothing + # Settings for credentials being invalidated (initiated by the remote network, possibly through user action). + # Keys have the same meanings as in the manual section. bad_credentials: - private: - relayed: - shared_no_users: - shared_has_users: + private: nothing + relayed: nothing + shared_no_users: nothing + shared_has_users: nothing # Settings for relay mode relay: @@ -54,26 +72,39 @@ config: enabled: false # -- Should only admins be allowed to set themselves as relay users? admin_only: true - default_relays: - # -- The formats to use when sending messages to Signal via the relaybot. + # -- List of user login IDs which anyone can set as a relay, as long as the relay user is in the room. + default_relays: [] + # -- The formats to use when sending messages via the relaybot. + # Available variables: + # .Sender.UserID - The Matrix user ID of the sender. + # .Sender.Displayname - The display name of the sender (if set). + # .Sender.RequiresDisambiguation - Whether the sender's name may be confused with the name of another user in the room. + # .Sender.DisambiguatedName - The disambiguated name of the sender. This will be the displayname if set, + # plus the user ID in parentheses if the displayname is not unique. + # If the displayname is not set, this is just the user ID. + # .Message - The `formatted_body` field of the message. + # .Caption - The `formatted_body` field of the message, if it's a caption. Otherwise an empty string. + # .FileName - The name of the file being sent. message_formats: - m.text: "{{ .Sender.Displayname }}: {{ .Message }}" - m.notice: "{{ .Sender.Displayname }}: {{ .Message }}" - m.emote: "* {{ .Sender.Displayname }} {{ .Message }}" - m.file: "{{ .Sender.Displayname }} sent a file" - m.image: "{{ .Sender.Displayname }} sent an image" - m.audio: "{{ .Sender.Displayname }} sent an audio file" - m.video: "{{ .Sender.Displayname }} sent a video" - m.location: "{{ .Sender.Displayname }} sent a location" - displayname_format: "" + m.text: "{{ .Sender.DisambiguatedName }}: {{ .Message }}" + m.notice: "{{ .Sender.DisambiguatedName }}: {{ .Message }}" + m.emote: "* {{ .Sender.DisambiguatedName }} {{ .Message }}" + m.file: "{{ .Sender.DisambiguatedName }} sent a file{{ if .Caption }}: {{ .Caption }}{{ end }}" + m.image: "{{ .Sender.DisambiguatedName }} sent an image{{ if .Caption }}: {{ .Caption }}{{ end }}" + m.audio: "{{ .Sender.DisambiguatedName }} sent an audio file{{ if .Caption }}: {{ .Caption }}{{ end }}" + m.video: "{{ .Sender.DisambiguatedName }} sent a video{{ if .Caption }}: {{ .Caption }}{{ end }}" + m.location: "{{ .Sender.DisambiguatedName }} sent a location{{ if .Caption }}: {{ .Caption }}{{ end }}" + # -- For networks that support per-message displaynames (i.e. Slack and Discord), the template for those names. + # This has all the Sender variables available under message_formats (but without the .Sender prefix). + # Note that you need to manually remove the displayname from message_formats above. + displayname_format: "{{ .DisambiguatedName }}" - # Permissions for using the bridge. + # -- Permissions for using the bridge. # Permitted values: - # block - # relay - Talk through the relaybot (if enabled), no access otherwise - # commands - - # user - Access to use the bridge to chat with a Signal account. - # admin - User level and some additional administration tools + # commands - Access to use commands in the bridge, but not login. + # user - Access to use the bridge with puppeting. + # admin - Full access, user level with some additional administration tools. # Permitted keys: # * - All Matrix users # domain - All users on that homeserver @@ -192,48 +223,91 @@ config: # -- Enable debug API at /debug with provisioning authentication. debug_endpoints: false + # Some networks require publicly accessible media download links (e.g. for user avatars when using Discord webhooks). + # These settings control whether the bridge will provide such public media access. public_media: + # -- Should public media be enabled at all? + # The public_address field under the appservice section MUST be set when enabling public media. enabled: false - signing_key: "" - hash_length: 0 + # -- A key for signing public media URLs. + # If set to "generate", a random key will be generated. + signing_key: generate + # -- Number of seconds that public media URLs are valid for. + # If set to 0, URLs will never expire. expiry: 0 + # -- Length of hash to use for public media URLs. Must be between 0 and 32. + hash_length: 32 + # Settings for converting remote media to custom mxc:// URIs instead of reuploading. + # More details can be found at https://docs.mau.fi/bridges/go/discord/direct-media.html direct_media: + # -- Should custom mxc:// URIs be used instead of reuploading media? enabled: false - media_id_prefix: "" - server_name: "" + # -- The server name to use for the custom mxc:// URIs. + # This server name will effectively be a real Matrix server, it just won't implement anything other than media. + # You must either set up .well-known delegation from this domain to the bridge, or proxy the domain directly to the bridge. + server_name: discord-media.example.com + # -- Optionally a custom .well-known response. This defaults to `server_name:443` + well_known_response: + # -- Optionally specify a custom prefix for the media ID part of the MXC URI. + media_id_prefix: + # -- If the remote network supports media downloads over HTTP, then the bridge will use MSC3860/MSC3916 + # media download redirects if the requester supports it. Optionally, you can force redirects + # and not allow proxying at all by setting this to false. + # This option does nothing if the remote network does not support media downloads over HTTP. + allow_proxy: true + # -- Matrix server signing key to make the federation tester pass, same format as synapse's .signing.key file. + # This key is also used to sign the mxc:// URIs to ensure only the bridge can generate them. server_key: "" - allow_proxy: false - well_known_response: "" + # Settings for backfilling messages. + # Note that the exact way settings are applied depends on the network connector. + # See https://docs.mau.fi/bridges/general/backfill.html for more details. backfill: + # -- Whether to do backfilling at all. enabled: false - max_initial_messages: - max_catchup_messages: - unread_hours_threshold: + # -- Maximum number of messages to backfill in empty rooms. + max_initial_messages: 50 + # -- Maximum number of missed messages to backfill after bridge restarts. + max_catchup_messages: 500 + # -- If a backfilled chat is older than this number of hours, + # mark it as read even if it's unread on the remote network. + unread_hours_threshold: 720 + # Settings for backfilling threads within other backfills. threads: - max_initial_messages: + # -- Maximum number of messages to backfill in a new thread. + max_initial_messages: 50 + # Settings for the backwards backfill queue. This only applies when connecting to + # Beeper as standard Matrix servers don't support inserting messages into history. queue: - enabled: - batch_size: - batch_delay: - max_batches: 10 - max_batches_override: - "a": 10 + # -- Should the backfill queue be enabled? + enabled: false + # -- Number of messages to backfill in one batch. + batch_size: 100 + # -- Delay between batches in seconds. + batch_delay: 20 + # -- Maximum number of batches to backfill per portal. + # If set to -1, all available messages will be backfilled. + max_batches: -1 + # -- Optional network-specific overrides for max batches. + # Interpretation of this field depends on the network connector. + max_batches_override: {} + + # Settings for enabling double puppeting double_puppet: - # -- Allow using double puppeting from any server with a valid client .well-known file. - allow_discovery: false - # -- Servers to always allow double puppeting from + # -- Servers to always allow double puppeting from. + # This is only for other servers and should NOT contain the server the bridge is on. servers: example.com: https://example.com - # -- Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth - # - # If set, double puppeting will be enabled automatically for local users - # instead of users having to find an access token and run `login-matrix` - # manually. + # -- Whether to allow client API URL discovery for other servers. When using this option, + # users on other servers can use double puppeting even if their server URLs aren't + # explicitly added to the servers map above. + allow_discovery: false + # -- Shared secrets for automatic double puppeting. + # See https://docs.mau.fi/bridges/general/double-puppeting.html for instructions. secrets: - example.com: foobar + example.com: as_token:foobar # End-to-bridge encryption support options. #