From e855c3e63058e65612ec6b673b1d379e78261052 Mon Sep 17 00:00:00 2001 From: Noah Date: Mon, 15 Apr 2024 15:14:37 -0500 Subject: [PATCH] Display technical site names in !sites command (fix #40) --- matrix_commands.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/matrix_commands.go b/matrix_commands.go index 6860759..314f947 100644 --- a/matrix_commands.go +++ b/matrix_commands.go @@ -31,7 +31,11 @@ func registerChatCommands() { return text + Circles["red"] + "Failed to get sites!" } for _, site := range sites { - text = fmt.Sprintf("%s- %s\n", text, site.getName()) + text = fmt.Sprintf("%s%s", text, site.getName()) + if site.config.name != "" { // Only add technical name to sites with a configured name. + text += " (" + site.name + ")" + } + text += "\n" } if len(sites) == 0 { text = text + "*No sites found*"