From: Art Cancro Date: Wed, 19 Dec 2018 04:17:54 +0000 (-0500) Subject: populate cs_inet_email with a default generated address ... we need it for XMPP X-Git-Tag: v939~330 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=2bcd29b7be1638c9b3038556a2f2eabd4b0e3af3 populate cs_inet_email with a default generated address ... we need it for XMPP --- diff --git a/citadel/modules/xmpp/serv_xmpp.c b/citadel/modules/xmpp/serv_xmpp.c index e0b61af64..2d8ef9d0f 100644 --- a/citadel/modules/xmpp/serv_xmpp.c +++ b/citadel/modules/xmpp/serv_xmpp.c @@ -413,17 +413,7 @@ void xmpp_xml_end(void *data, const char *supplied_el) { } /* Generate the "full JID" of the client resource */ - - if (IsEmptyStr(CC->cs_inet_email)) { // synthetic user@host if no email is set - snprintf(XMPP->client_jid, sizeof XMPP->client_jid, - "%ld@%s/%s", CC->user.usernum, CtdlGetConfigStr("c_fqdn"), XMPP->iq_client_resource - ); - } - else { // use the email address if we have it - snprintf(XMPP->client_jid, sizeof XMPP->client_jid, - "%s/%s", CC->cs_inet_email, XMPP->iq_client_resource - ); - } + snprintf(XMPP->client_jid, sizeof XMPP->client_jid, "%s/%s", CC->cs_inet_email, XMPP->iq_client_resource); /* Tell the client what its JID is */ diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 9b4ee0d4f..32734200e 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -659,12 +659,11 @@ void do_login(void) #endif /* - * No email address for user? Make one up. (commented out because it appears to break things) + * No email address for user? Make one up. (Apparently this broke something in the past. What was it?) + */ if (IsEmptyStr(CC->user.emailaddrs)) { sprintf(CC->user.emailaddrs, "cit%ld@%s", CC->user.usernum, CtdlGetConfigStr("c_fqdn")); } - */ - /* * Populate cs_inet_email and cs_inet_other_emails with valid email addresses from the user record