feat: add configurable matrix permalink base, unify user placeholders, and refactor notification rendering

feat: add configurable matrix permalink base, unify user placeholders, and refactor notification rendering
This commit is contained in:
2026-04-10 23:55:17 +02:00
parent bc490bd084
commit b2541c4054
36 changed files with 406 additions and 65 deletions
Regular → Executable
+15 -5
View File
@@ -115,16 +115,21 @@ plugin_config:
# auto-greet users in rooms with these messages
# map greeting messages to a room
# you can use {user} to reference the joining user in this message using a
# matrix.to link (rendered as a "pill" in element clients)
# available placeholders:
# - {user}: display name of the joining user (falls back to localpart or user ID)
# - {user_id}: full Matrix user ID
# - {user_link}: clickable matrix.to-compatible link to the joining user
# - {room}: room name (or room ID if no name is set)
# - {room_link}: clickable matrix.to-compatible link to the room
# - {room_id}: raw room ID
# html formatting is supported
# set to {} if you don't care about greetings
greetings:
generic: |
Welcome {user}! Please be sure to read the topic for helpful links and information.
Welcome {user_link}! Please be sure to read the topic for helpful links and information.
Use <a href="https://google.com">Google</a> for all other queries ;)
encrypted: |
welcome {user}, this is an encrypted room, so you may not be able to see messages previously sent here. don't be
welcome {user_link}, this is an encrypted room, so you may not be able to see messages previously sent here. don't be
alarmed.
# which of the above greetings should be used in which rooms? use the exact name of each greeting
@@ -145,7 +150,12 @@ plugin_config:
# message to send to the notification room when someone joins one of the above rooms:
join_notification_message: |
User <code>{user}</code> has joined <code>{room}</code>.
{user_link} has joined {room_link} ({user_id}).
# Base URL for Matrix permalink generation.
# This is used for placeholders such as {user_link} and {room_link}.
# Set this to your own matrix.to-compatible instance if you do not want to use https://matrix.to.
matrix_to_base_url: "https://matrix.to"
# whether to censor files/messages
# can be boolean (true/false) for all-or-nothing behavior,