From edf4065a98d0c51695bfab46aa6dbb066fdbc687 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sat, 19 Aug 2023 16:44:33 +0200 Subject: [PATCH] Make groupchats and the alias configurable --- entrypoint.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 5fa514a..b30ee89 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -15,4 +15,12 @@ if [[ ! -z "${PLUGIN_XMPP_TLS}" ]]; then SERVER_TLS=--tls fi -echo -e "$MESSAGE" | go-sendxmpp -u ${XMPP_JID} -p ${XMPP_PASSWORD} ${SERVER_DETAILS[@]} ${SERVER_TLS} -a 2B -c ${PLUGIN_XMPP_MUC} +GROUPCHAT="" +if [[ ! -z "${PLUGIN_XMPP_IS_MUC}" ]]; then + GROUPCHAT="-c" + + # Make the bot nickname configurable + BOT_ALIAS=(-a ${PLUGIN_XMPP_ALIAS:-"Woodpecker CI"}) +fi + +echo -e "$MESSAGE" | go-sendxmpp -u ${XMPP_JID} -p ${XMPP_PASSWORD} ${SERVER_DETAILS[@]} ${SERVER_TLS} ${BOT_ALIAS} ${GROUPCHAT} ${PLUGIN_XMPP_MUC}