Relay mode
All megabridges support relay mode with the same mechanism: a specific login can be designated as a relay, which will be used for bridging messages from users who haven't logged into the bridge.
- Enable relay mode by setting
bridge→relay→enabledtotruein the bridge config. Also make sure that the users you want to invite have at least therelaylevel in thepermissionssection.- By default,
admin_onlyis true, which means only bridge admins (as defined by thepermissionssection) can set a relay. If you want room admins to also be able to set themselves as a relay, setadmin_onlytofalse.
- By default,
- Log into the bridge normally using the relaybot account.
- If you want a separate remote account for the relaybot while using your own account for your own Matrix user, you should make a dedicated Matrix account for the relaybot. If you do this, make sure to run the next command using the new Matrix account too.
- Using the same dedicated account for multiple bridges is fine, so you can have a server-wide "relay" account that acts as the relay for all the bridges.
- By default, admins can set any login as a relay, while non-admins can only
set themselves as a relay. If you want to set up a shared relay account
that anyone can enable, add the login ID (from
list-logins) to thedefault_relayslist in the config after logging in.
- Run
!prefix set-relayin the chats where you want to use the relaybot, replacing!prefixwith the appropriate command prefix for the bridge, like!signalor!wa. You can also useset-relay <login ID>to choose a specific login to be the relay (uselist-loginsto find login IDs). - Use
!prefix set-pl 100to be able to modify room settings and invite others.
Note that reactions from relayed users will not be bridged at all, because the bot wouldn't be able to bridge sender info nor multiple reactions of the same emoji.
Bridging existing rooms
If you want to bridge existing rooms, you can use the !prefix bridge command
in v26.04 and up.
The bridge command takes one or two parameters: first optionally the login ID
to use and second the internal chat ID on the remote network. If a login ID is
not provided, the command will use either the sender's default login, or the
first valid login in the default_relays config.
You may also want to add the relay login IDs to bridge → portal_create_filter
→ always_deny_from_login in order to prevent automatic portal room creation.
If a portal room is already created, a bridge admin or room admin in the existing
portal is required to unbridge it.
When the command is used with a login listed in default_relays, it will
automatically apply set-relay as well.
Note: if relay → allow_bridge is set to false, then default relays will
not be used.
Legacy bridges
Some of the legacy bridges that haven't been rewritten as Megabridges yet have slightly different system. In particular
- Telegram has relay bots
- Discord has relay webhooks
- iMessage doesn't require using
set-relay, enabling it in the config will enable relay in all chats. - Google Chat doesn't support relay mode at all