Skip to content

Commit 98331ae

Browse files
committed
Upgrade baibot (v1.10.0 -> v1.11.0) and add support for configuring a custom avatar
1 parent 5612af9 commit 98331ae

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

roles/custom/matrix-bot-baibot/defaults/main.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ matrix_bot_baibot_container_repo_version: "{{ 'main' if matrix_bot_baibot_versio
1717
matrix_bot_baibot_container_src_files_path: "{{ matrix_base_data_path }}/baibot/container-src"
1818

1919
# renovate: datasource=docker depName=ghcr.io/etkecc/baibot
20-
matrix_bot_baibot_version: v1.10.0
20+
matrix_bot_baibot_version: v1.11.0
2121
matrix_bot_baibot_container_image: "{{ matrix_bot_baibot_container_image_registry_prefix }}etkecc/baibot:{{ matrix_bot_baibot_version }}"
2222
matrix_bot_baibot_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_baibot_container_image_self_build else matrix_bot_baibot_container_image_registry_prefix_upstream }}"
2323
matrix_bot_baibot_container_image_registry_prefix_upstream: "{{ matrix_bot_baibot_container_image_registry_prefix_upstream_default }}"
@@ -70,6 +70,23 @@ matrix_bot_baibot_config_user_password: ''
7070
# Also see: `matrix_bot_baibot_config_user_mxid_localpart`
7171
matrix_bot_baibot_config_user_name: baibot
7272

73+
# Controls the `user.avatar` configuration setting.
74+
#
75+
# An optional path to an image file to be used as a custom avatar image.
76+
# This path should be an in-container path (e.g., `/data/avatar.png`).
77+
# Any type of content type is supported, but stick to common image formats (PNG, JPG, ..) for better compatibility with various Matrix clients.
78+
#
79+
# To use a custom avatar:
80+
# - Use the auxiliary role (`aux_` variables) to upload your avatar file to the server (e.g. to {{ matrix_bot_baibot_data_path }}/avatar.png on the host),
81+
# or do it any other way (without Ansible) you prefer
82+
# - Set this variable to something like `/data/avatar.png` (the in-container path)
83+
#
84+
# Possible values:
85+
# - null or empty string: use the default baibot avatar
86+
# - "keep": don't touch the avatar, keep whatever is already set (useful if you manage the avatar via other means)
87+
# - any other value: path to a custom avatar image file (must be an in-container path like `/data/avatar.png`)
88+
matrix_bot_baibot_config_user_avatar: null
89+
7390
# Controls the `user.encryption.recovery_passphrase` configuration setting.
7491
#
7592
# An optional passphrase to use for backing up and recovering the bot's encryption keys.

roles/custom/matrix-bot-baibot/templates/config.yaml.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ user:
2121
# Leave empty to use the default (baibot).
2222
name: {{ matrix_bot_baibot_config_user_name | to_json }}
2323

24+
# An optional path to an image file to be used as a custom avatar image.
25+
# - null or empty string: use the default avatar
26+
# - "keep": don't touch the avatar, keep whatever is already set
27+
# - any other value: path to a custom avatar image file
28+
avatar: {{ matrix_bot_baibot_config_user_avatar | to_json }}
29+
2430
encryption:
2531
# An optional passphrase to use for backing up and recovering the bot's encryption keys.
2632
# You can use any string here.

0 commit comments

Comments
 (0)