diff --git a/setup_final.sh b/setup_final.sh index 7fa2849..a33d63f 100755 --- a/setup_final.sh +++ b/setup_final.sh @@ -202,21 +202,43 @@ bridge: bridge_notices: default: false exceptions: [] - relay_user_distinguishers: [🟦, 🟣, 🟩, ⭕️, 🔶, ⬛️, 🔵, 🟢] + relay_user_distinguishers: ["🟦", "🟣", "🟩", "⭕️", "🔶", "⬛️", "🔵", "🟢"] + # The formats to use when sending messages to Telegram via the relay bot. + # Text msgtypes (m.text, m.notice and m.emote) support HTML, media msgtypes don't. + # + # Available variables: + # \$sender_displayname - The display name of the sender (e.g. Example User) + # \$sender_username - The username (Matrix ID localpart) of the sender (e.g. exampleuser) + # \$sender_mxid - The Matrix ID of the sender (e.g. @exampleuser:example.com) + # \$distinguisher - A random string from the options in the relay_user_distinguishers array. + # \$message - The message content message_formats: - m.text: '$distinguisher $sender_displayname: $message' - m.notice: '$distinguisher $sender_displayname: $message' - m.emote: '* $distinguisher $sender_displayname $message' - m.file: '$distinguisher $sender_displayname sent a file: $message' - m.image: '$distinguisher $sender_displayname sent an image: $message' - m.audio: '$distinguisher $sender_displayname sent an audio file: $message' - m.video: '$distinguisher $sender_displayname sent a video: $message' - m.location: '$distinguisher $sender_displayname sent a location: $message' - emote_format: '* $mention $formatted_body' + m.text: '\$distinguisher \$sender_displayname: \$message' + m.notice: '\$distinguisher \$sender_displayname: \$message' + m.emote: '* \$distinguisher \$sender_displayname \$message' + m.file: '\$distinguisher \$sender_displayname sent a file: \$message' + m.image: '\$distinguisher \$sender_displayname sent an image: \$message' + m.audio: '\$distinguisher \$sender_displayname sent an audio file: \$message' + m.video: '\$distinguisher \$sender_displayname sent a video: \$message' + m.location: '\$distinguisher \$sender_displayname sent a location: \$message' + # Telegram doesn't have built-in emotes, this field specifies how m.emote's from authenticated + # users are sent to telegram. All fields in message_formats are supported. Additionally, the + # Telegram user info is available in the following variables: + # \$displayname - Telegram displayname + # \$username - Telegram username (may not exist) + # \$mention - Telegram @username or displayname mention (depending on which exists) + emote_format: '* \$mention \$formatted_body' + + # The formats to use when sending state events to Telegram via the relay bot. + # + # Variables from `message_formats` that have the `sender_` prefix are available without the prefix. + # In name_change events, `\$prev_displayname` is the previous displayname. + # + # Set format to an empty string to disable the messages for that event. state_event_formats: - join: $distinguisher $displayname joined the room. - leave: $distinguisher $displayname left the room. - name_change: $distinguisher $prev_displayname changed their name to $distinguisher $displayname + join: \$distinguisher \$displayname joined the room. + leave: \$distinguisher \$displayname left the room. + name_change: \$distinguisher \$prev_displayname changed their name to \$distinguisher \$displayname filter: mode: blacklist list: []