Files
mautrix-telegram/example-config.yaml
T
Tulir Asokan ad6a9ebae3 Start Python rewrite
Initial setup, config parsing and registration generation is included.
2018-01-16 23:33:01 +02:00

83 lines
2.9 KiB
YAML

# Homeserver details
homeserver:
address: https://matrix.org
domain: matrix.org
# Application service host/registration related details
# Changing these values requires regeneration of the registration.
appservice:
# The protocol the homeserver should use when connecting to this appservice.
# Usually "http" or "https".
protocol: http
# The hostname and port where the homeserver can find this appservice.
hostname: localhost
port: 8080
# Whether or not to enable debug messages in the console.
debug: false
# The unique ID of this appservice.
id: telegram
# Username of the appservice bot.
bot_username: telegrambot
# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
as_token: "This value is generated when generating the registration"
hs_token: "This value is generated when generating the registration"
# Bridge config
bridge:
# Localpart template of MXIDs for Telegram users.
# {} is replaced with the user ID of the Telegram user.
username_template: "telegram_{}"
# Localpart template of room aliases for Telegram portal rooms.
# {} is replaced with the name part of the public channel/group invite link ( https://t.me/{} )
alias_template: "telegram_{}"
# Displayname template for Telegram users.
# {} is replaced with the display name of the Telegram user.
displayname_template: "{} (Telegram)"
# Set the preferred order of user identifiers which to use in the Matrix puppet display name.
# In the (hopefully unlikely) scenario that none of the given keys are found, the numeric user ID is used.
#
# If the bridge is working properly, a phone number or an username should always be known, but the other one can
# very well be empty.
#
# Valid keys:
# fullName (First and/or last name)
# fullNameReversed (Last and/or first name)
# firstName
# lastName
# username
# phoneNumber
displayname_preference:
- fullName
- username
- phoneNumber
# Bridge command configuration
commands:
# The prefix for commands.
# This is only required in rooms with users more than two users.
prefix: "!tg"
# Whether or not to allow management commands in rooms with more than two users.
# Non-management commands are allowed in portal rooms even if this is false.
allow_in_groups: false
# Enables the !tg api ... commands for debugging.
allow_direct_api_calls: false
# Whitelist of user IDs that are allowed to use this bridge. Leave empty to disable.
# You can enter a domain without the localpart to allow all users from that homeserver to use the bridge.
whitelist:
- "internal-hs.example.com"
- "@user:public.example.com"
# Telegram config
telegram:
# Get your own API keys at https://my.telegram.org/apps
api_id: 12345
api_hash: tjyd5yge35lbodk1xwzw2jstp90k55qz