Skip to content

Commit

Permalink
Remove separate signalv2 config, update gmessages to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Aug 7, 2024
1 parent 7c522e7 commit a74f495
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 611 deletions.
1 change: 1 addition & 0 deletions bridgeconfig/bridgeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type BridgeV2Name struct {
CommandPrefix string
BridgeTypeName string
BridgeTypeIcon string
DefaultPickleKey string
}

type Params struct {
Expand Down
102 changes: 101 additions & 1 deletion bridgeconfig/bridgev2.tpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,33 @@ bridge:
# Should the bridge create a space for each login containing the rooms that account is in?
personal_filtering_spaces: 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:
# Should cleanup on logout be enabled at all?
enabled: true
# Settings for manual logouts (explicitly initiated by the Matrix user)
manual:
# Action for private portals which will never be shared with other Matrix users.
private: delete
# Action for portals with a relay user configured.
relayed: delete
# Action for portals which may be shared, but don't currently have any other Matrix users.
shared_no_users: delete
# Action for portals which have other logged-in Matrix users.
shared_has_users: delete
# 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: nothing
relayed: nothing
shared_no_users: nothing
shared_has_users: nothing

# Settings for relay mode
relay:
# Whether relay mode should be allowed. If allowed, the set-relay command can be used to turn any
Expand Down Expand Up @@ -150,6 +177,79 @@ provisioning:
# Enable debug API at /debug with provisioning authentication.
debug_endpoints: true

# 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
# A key for signing public media URLs.
# If set to "generate", a random key will be generated.
signing_key: {{ .ProvisioningSecret }}
# 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
# 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: ed25519 AAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

# 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: true
# 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:
# 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:
# Should the backfill queue be enabled?
enabled: true
# Number of messages to backfill in one batch.
batch_size: 50
# 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: 0
# Optional network-specific overrides for max batches.
# Interpretation of this field depends on the network connector.
max_batches_override:
channel: 10
dm: -1
group_dm: -1

# Settings for enabling double puppeting
double_puppet:
# Servers to always allow double puppeting from.
Expand Down Expand Up @@ -183,7 +283,7 @@ encryption:
allow_key_sharing: true
# Pickle key for encrypting encryption keys in the bridge database.
# If set to generate, a random key will be generated.
pickle_key: bbctl
pickle_key: {{ or .Params.pickle_key .DefaultPickleKey "bbctl" }}
# Options for deleting megolm sessions from the bridge.
delete_keys:
# Beeper-specific: delete outbound sessions when hungryserv confirms
Expand Down
Loading

0 comments on commit a74f495

Please sign in to comment.