109 lines
4.3 KiB
YAML
109 lines
4.3 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
|
|
|
|
# Public part of web server for out-of-Matrix interaction with the bridge.
|
|
# Used for things like login if the user wants to make sure the 2FA password isn't stored in
|
|
# the HS database.
|
|
public:
|
|
# Whether or not the public-facing endpoints should be enabled.
|
|
enabled: true
|
|
# The prefix to use in the public-facing endpoints.
|
|
prefix: /public
|
|
# The base URL where the public-facing endpoints are available. The prefix is not added
|
|
# implicitly.
|
|
external: https://example.com/public
|
|
|
|
# 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
|
|
bot_displayname: Telegram bridge bot
|
|
|
|
# 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.
|
|
# {userid} is replaced with the user ID of the Telegram user.
|
|
username_template: "telegram_{userid}"
|
|
# Localpart template of room aliases for Telegram portal rooms.
|
|
# {groupname} is replaced with the name part of the public channel/group invite link ( https://t.me/{} )
|
|
alias_template: "telegram_{groupname}"
|
|
# Displayname template for Telegram users.
|
|
# {displayname} is replaced with the display name of the Telegram user.
|
|
displayname_template: "{displayname} (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:
|
|
# "full name" (First and/or last name)
|
|
# "full name reversed" (Last and/or first name)
|
|
# "first name"
|
|
# "last name"
|
|
# "username"
|
|
# "phone number"
|
|
displayname_preference:
|
|
- full name
|
|
- username
|
|
- phone number
|
|
|
|
# Whether or not to use native Matrix replies. At the time of writing, only riot-web supports
|
|
# replies and the format of them is subject to change.
|
|
native_replies: True
|
|
# If native replies are disabled, should the custom replies contain a link to the message being
|
|
# replied to?
|
|
link_in_reply: False
|
|
# Show message editing as a reply to the original message.
|
|
# If this is false, message edits are not shown at all, as Matrix does not support editing yet.
|
|
edits_as_replies: False
|
|
# Whether or not Matrix bot messages (type m.notice) should be bridged.
|
|
bridge_notices: False
|
|
# The maximum number of simultaneous Telegram deletions to handle.
|
|
# A large number of simultaneous redactions could put strain on your homeserver.
|
|
max_telegram_delete: 10
|
|
|
|
# The prefix for commands. Only required in non-management rooms.
|
|
command_prefix: "!tg"
|
|
|
|
# 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.example.com"
|
|
- "@user:public.example.com"
|
|
|
|
# Admins can do things like delete portal rooms. Here you must specify the exact MXID, domains
|
|
# are not accepted.
|
|
admins:
|
|
- "@admin:internal.example.com"
|
|
|
|
# Telegram config
|
|
telegram:
|
|
# Get your own API keys at https://my.telegram.org/apps
|
|
api_id: 12345
|
|
api_hash: tjyd5yge35lbodk1xwzw2jstp90k55qz
|
|
# (Optional) Create your own bot at https://t.me/BotFather
|
|
#bot_token: 123456789:ABCD-QBPd3VrWRhg623xYh07WUWErYA9eMI
|