Просмотр исходного кода

Merge pull request #1493 from SierraKiloBravo/allow-configuring-mautrix-telegram-name-templates

Allow editing of MXID/dispname templates for mautrix-telegram users
pull/1495/head
Slavi Pantaleev 4 лет назад
committed by GitHub
Родитель
Сommit
d166a90514
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: 4AEE18F83AFDEB23
2 измененных файлов: 11 добавлений и 3 удалений
  1. +5
    -0
      roles/matrix-bridge-mautrix-telegram/defaults/main.yml
  2. +6
    -3
      roles/matrix-bridge-mautrix-telegram/templates/config.yaml.j2

+ 5
- 0
roles/matrix-bridge-mautrix-telegram/defaults/main.yml Просмотреть файл

@@ -130,3 +130,8 @@ matrix_mautrix_telegram_registration_yaml: |
de.sorunome.msc2409.push_ephemeral: true de.sorunome.msc2409.push_ephemeral: true


matrix_mautrix_telegram_registration: "{{ matrix_mautrix_telegram_registration_yaml|from_yaml }}" matrix_mautrix_telegram_registration: "{{ matrix_mautrix_telegram_registration_yaml|from_yaml }}"

# Templates for defining MXID's and displaynames for users and rooms.
matrix_mautrix_telegram_username_template: 'telegram_{userid}'
matrix_mautrix_telegram_alias_template: 'telegram_{groupname}'
matrix_mautrix_telegram_displayname_template: '{displayname} (Telegram)'

+ 6
- 3
roles/matrix-bridge-mautrix-telegram/templates/config.yaml.j2 Просмотреть файл

@@ -69,13 +69,16 @@ appservice:
bridge: bridge:
# Localpart template of MXIDs for Telegram users. # Localpart template of MXIDs for Telegram users.
# {userid} is replaced with the user ID of the Telegram user. # {userid} is replaced with the user ID of the Telegram user.
username_template: "telegram_{userid}"
# Default: telegram_{userid}
username_template: {{ matrix_mautrix_telegram_username_template|to_json }}
# Localpart template of room aliases for Telegram portal rooms. # 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/{} ) # {groupname} is replaced with the name part of the public channel/group invite link ( https://t.me/{} )
alias_template: "telegram_{groupname}"
# Default: telegram_{groupname}
alias_template: {{ matrix_mautrix_telegram_alias_template|to_json }}
# Displayname template for Telegram users. # Displayname template for Telegram users.
# {displayname} is replaced with the display name of the Telegram user. # {displayname} is replaced with the display name of the Telegram user.
displayname_template: "{displayname} (Telegram)"
# Default: {displayname} (Telegram)
displayname_template: {{ matrix_mautrix_telegram_displayname_template|to_json }}


# Set the preferred order of user identifiers which to use in the Matrix puppet display name. # 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 # In the (hopefully unlikely) scenario that none of the given keys are found, the numeric user


Загрузка…
Отмена
Сохранить