From 654d4b81b15721f7a999dddc8cb24c14cc4333fa Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 19 Aug 2025 20:03:01 +0200 Subject: [PATCH 1/2] mod_register: Don't duplicate welcome message Originally, the welcome message was sent as type 'normal'. Apparently, some clients don't display 'normal' messages as expected (see #4246). To address that issue, commit 9a0ff13cc2c228e45e9def48f3e25122003c1e6f duplicated the welcome message as type 'chat'. However, we shouldn't send both formats. The 'normal' message is either ignored by the client, in which case it serves no purpose, or displayed, in which case the user would see the message twice. --- src/mod_register.erl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/mod_register.erl b/src/mod_register.erl index 3c32bc362..7302841ad 100644 --- a/src/mod_register.erl +++ b/src/mod_register.erl @@ -420,12 +420,7 @@ send_welcome_message(JID) -> to = JID, type = chat, subject = xmpp:mk_text(Subj), - body = xmpp:mk_text(<>)}), - ejabberd_router:route( - #message{from = jid:make(Host), - to = JID, - subject = xmpp:mk_text(Subj), - body = xmpp:mk_text(Body)}) + body = xmpp:mk_text(<>)}) end. send_registration_notifications(Mod, UJID, Source) -> From a46325166a2059ed9f2b0570fe4811ddb3210cb9 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 19 Aug 2025 20:09:17 +0200 Subject: [PATCH 2/2] mod_register: Don't duplicate welcome subject Don't include the configured welcome message subject with the body. If that's desired, the admin can simply configure it that way. But if it's undesired, there would be no way to avoid the subject duplication. --- src/mod_register.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod_register.erl b/src/mod_register.erl index 7302841ad..793c3c54d 100644 --- a/src/mod_register.erl +++ b/src/mod_register.erl @@ -420,7 +420,7 @@ send_welcome_message(JID) -> to = JID, type = chat, subject = xmpp:mk_text(Subj), - body = xmpp:mk_text(<>)}) + body = xmpp:mk_text(Body)}) end. send_registration_notifications(Mod, UJID, Source) ->