Skip to content

Commit 9e31a25

Browse files
committed
Extract mautrix-slack's network.displayname_template configuration into a variable (matrix_mautrix_slack_network_displayname_template)
1 parent 1ccb6c8 commit 9e31a25

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

roles/custom/matrix-bridge-mautrix-slack/defaults/main.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,27 @@ matrix_mautrix_slack_appservice_address: "http://matrix-mautrix-slack:8080"
3636

3737
matrix_mautrix_slack_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"
3838

39+
# Displayname template for Slack users. Available variables:
40+
# .Name - The username of the user
41+
# .Team.Name - The name of the team the channel is in
42+
# .Team.Domain - The Slack subdomain of the team the channel is in
43+
# .ID - The internal ID of the user
44+
# .IsBot - Whether the user is a bot
45+
# .Profile.DisplayName - The username or real name of the user (depending on settings)
46+
# Variables only available for users (not bots):
47+
# .TeamID - The internal ID of the workspace the user is in
48+
# .TZ - The timezone region of the user (e.g. Europe/London)
49+
# .TZLabel - The label of the timezone of the user (e.g. Greenwich Mean Time)
50+
# .TZOffset - The UTC offset of the timezone of the user (e.g. 0)
51+
# .Profile.RealName - The real name of the user
52+
# .Profile.FirstName - The first name of the user
53+
# .Profile.LastName - The last name of the user
54+
# .Profile.Title - The job title of the user
55+
# .Profile.Pronouns - The pronouns of the user
56+
# .Profile.Email - The email address of the user
57+
# .Profile.Phone - The formatted phone number of the user
58+
matrix_mautrix_slack_network_displayname_template: '{% raw %}{{or .Profile.DisplayName .Profile.RealName .Name}}{{if .IsBot}} (bot){{end}}{% endraw %}'
59+
3960
matrix_mautrix_slack_command_prefix: "!slack"
4061

4162
matrix_mautrix_slack_bridge_permissions: |

roles/custom/matrix-bridge-mautrix-slack/templates/config.yaml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ network:
2020
# .Profile.Pronouns - The pronouns of the user
2121
# .Profile.Email - The email address of the user
2222
# .Profile.Phone - The formatted phone number of the user
23-
displayname_template: '{% raw %}{{or .Profile.DisplayName .Profile.RealName .Name}}{{if .IsBot}} (bot){{end}}{% endraw %}'
23+
displayname_template: {{ matrix_mautrix_slack_network_displayname_template | to_json }}
2424
# Channel name template for Slack channels (all types). Available variables:
2525
# .Name - The name of the channel
2626
# .Team.Name - The name of the team the channel is in

0 commit comments

Comments
 (0)