Start Python rewrite
Initial setup, config parsing and registration generation is included.
This commit is contained in:
+30
-16
@@ -4,25 +4,40 @@ homeserver:
|
||||
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 the 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
|
||||
id: telegram
|
||||
|
||||
# Whether or not to enable debug messages in the console.
|
||||
debug: false
|
||||
|
||||
# Path to the registration file. This is automatically updated when generating a registration.
|
||||
registration: ./registration.yaml
|
||||
# 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:
|
||||
# ${ID} is replaced with the user ID of the Telegram user.
|
||||
username_template: "telegram_${ID}"
|
||||
# ${DISPLAYNAME} is replaced with the display name of the Telegram user.
|
||||
displayname_template: "${DISPLAYNAME} (Telegram)"
|
||||
# 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.
|
||||
#
|
||||
@@ -40,19 +55,18 @@ bridge:
|
||||
- fullName
|
||||
- username
|
||||
- phoneNumber
|
||||
# ${NAME} is replaced with the name part of the public channel/group invite link ( https://t.me/${NAME} )
|
||||
alias_template: "telegram_${NAME}"
|
||||
# Username of the bot. The registration must be regenerated to change this.
|
||||
bot_username: telegrambot
|
||||
|
||||
# Bridge management command configuration
|
||||
# Bridge command configuration
|
||||
commands:
|
||||
# The prefix for all management commands.
|
||||
# Can be removed to disable management commands in rooms with more than two users.
|
||||
# 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.
|
||||
# Do not enable this in production, it allows all whitelisted users to call any Telegram API methods freely.
|
||||
allow_direct_api_calls: false
|
||||
|
||||
# Whitelist of user IDs that are allowed to use this bridge. Leave empty to disable.
|
||||
|
||||
Reference in New Issue
Block a user