| 1 | # Telegram settings |
| 2 | |
| 3 | > [!TIP] |
| 4 | > This page contains the details about telegram settings. More general information about telegram support in matterbridge can be found in [README.md](README.md). |
| 5 | |
| 6 | ## MediaConvertTgs |
| 7 | |
| 8 | Convert Tgs (Telegram animated sticker) images to some other file format before upload. See FAQ for setup instructions. |
| 9 | |
| 10 | - Setting: **OPTIONAL**, **RELOADABLE** |
| 11 | - Format: *string* |
| 12 | - Possible values: |
| 13 | - `"png"` (still-image) |
| 14 | - `"webp"` (animated webp) |
| 15 | - Example: |
| 16 | ```toml |
| 17 | MediaConvertTgs="png" |
| 18 | ``` |
| 19 | |
| 20 | ## MediaConvertWebPToPNG |
| 21 | |
| 22 | Convert WebP images to PNG before upload to the media server or other bridges (for compatibility). |
| 23 | |
| 24 | - Setting: **OPTIONAL**, **RELOADABLE** |
| 25 | - Format: *boolean* |
| 26 | - Example: |
| 27 | ```toml |
| 28 | MediaConvertWebPToPNG=true |
| 29 | ``` |
| 30 | |
| 31 | ## MessageFormat |
| 32 | |
| 33 | TODO: is this only for outgoing messages? |
| 34 | |
| 35 | - Setting: **OPTIONAL**, **RELOADABLE** |
| 36 | - Format: *string* |
| 37 | - Possible values: |
| 38 | - [`"HTML"`](https://core.telegram.org/bots/api#html-style) |
| 39 | - [`"Markdown"`](https://core.telegram.org/bots/api#markdown-style). Deprecated, does not display links with underscores `_` correctly. |
| 40 | - [`"MarkdownV2"`](https://core.telegram.org/bots/api#markdownv2-style) |
| 41 | - `"HTMLNick"`. This only allows HTML for the nick, the message itself will be html-escaped. |
| 42 | - Default: `""` |
| 43 | - Example: |
| 44 | ```toml |
| 45 | MessageFormat="MarkdownV2" |
| 46 | ``` |
| 47 | |
| 48 | ## QuoteDisable |
| 49 | |
| 50 | Disable quoted/reply messages |
| 51 | |
| 52 | - Setting: **OPTIONAL**, **RELOADABLE** |
| 53 | - Format: *boolean* |
| 54 | - Example: |
| 55 | ```toml |
| 56 | QuoteDisable=true |
| 57 | ``` |
| 58 | |
| 59 | ## QuoteFormat |
| 60 | |
| 61 | Format quoted/reply messages |
| 62 | |
| 63 | - Setting: **OPTIONAL**, **RELOADABLE** |
| 64 | - Format: *string* |
| 65 | - Default: `"{MESSAGE} (re @{QUOTENICK}: {QUOTEMESSAGE})"` |
| 66 | - Example: |
| 67 | ```toml |
| 68 | QuoteFormat="{@{QUOTENICK}, {MESSAGE}}" |
| 69 | ``` |
| 70 | |
| 71 | ## QuoteLengthLimit |
| 72 | |
| 73 | Limits {QUOTEMESSAGE} into integer characters specified in this. |
| 74 | |
| 75 | TODO: does this cut graphemes or bytes? |
| 76 | |
| 77 | - Setting: **OPTIONAL** |
| 78 | - Format: *int* |
| 79 | - Example: |
| 80 | ```toml |
| 81 | QuoteLengthLimit=46 |
| 82 | ``` |
| 83 | |
| 84 | ## DisableWebPagePreview |
| 85 | |
| 86 | Disables link previews for links in messages |
| 87 | |
| 88 | - Setting: **OPTIONAL**, **RELOADABLE** |
| 89 | - Format: *boolean* |
| 90 | - Example: |
| 91 | ```toml |
| 92 | DisableWebPagePreview=true |
| 93 | ``` |
| 94 | |
| 95 | ## Token |
| 96 | |
| 97 | Token to connect with telegram API. |
| 98 | |
| 99 | - Setting: **REQUIRED** |
| 100 | - Format: *string* |
| 101 | - Example: |
| 102 | ```toml |
| 103 | Token="Yourtokenhere" |
| 104 | ``` |
| 105 | |
| 106 | ## UseFirstName |
| 107 | |
| 108 | If enabled use the "First Name" as username. If this is empty use the Username |
| 109 | If disabled use the "Username" as username. If this is empty use the First Name |
| 110 | If all names are empty, username will be "unknown" |
| 111 | |
| 112 | - Setting: **OPTIONAL**, **RELOADABLE** |
| 113 | - Format: *boolean* |
| 114 | - Example: |
| 115 | ```toml |
| 116 | UseFirstName=true |
| 117 | ``` |
| 118 | |
| 119 | ## UseInsecureURL |
| 120 | |
| 121 | > [!WARNING] |
| 122 | > If enabled this will relay GIF/stickers/documents and other attachments as URLs |
| 123 | > Those URLs will contain your bot-token. This may not be what you want. |
| 124 | > For now there is no secure way to relay GIF/stickers/documents without seeing your token. |
| 125 | |
| 126 | - Setting: **OPTIONAL**, **RELOADABLE** |
| 127 | - Format: *boolean* |
| 128 | - Example: |
| 129 | ```toml |
| 130 | UseInsecureURL=true |
| 131 | ``` |
| 132 | |