X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fxmpp%2Fxmpp_query_namespace.c;fp=citadel%2Fmodules%2Fxmpp%2Fxmpp_query_namespace.c;h=8482b4b81b2b5cecc037cddb7161e8e51cf4fea2;hp=795cd0e28a4996f085dc12255320a69c1f6233c3;hb=6d2eb0194d859fbc6a31ea2c5a8b4e1624070e0a;hpb=af679dc8a1dc74b7e4b204ccc1b6e187299ab896 diff --git a/citadel/modules/xmpp/xmpp_query_namespace.c b/citadel/modules/xmpp/xmpp_query_namespace.c index 795cd0e28..8482b4b81 100644 --- a/citadel/modules/xmpp/xmpp_query_namespace.c +++ b/citadel/modules/xmpp/xmpp_query_namespace.c @@ -79,7 +79,7 @@ void xmpp_iq_roster_query(void) int nContexts, i; syslog(LOG_DEBUG, "Roster push!"); - cprintf(""); + cprintf(""); cptr = CtdlGetContextArray(&nContexts); if (cptr) { for (i=0; iclient_jid, sizeof(dom)); // result stanza is "from" - it wants the + if (IsEmptyStr(dom)) { // same domain that the user's jid is in. + safestrncpy(dom, XMPP->server_name, sizeof(dom)); + } + char *at = strrchr(dom, '@'); + if (at) { + strcpy(dom, ++at); + } + char *slash = strchr(dom, '/'); + if (slash) { + *slash = 0; + } + if (supported_namespace) { - cprintf("server_name, sizeof xmlbuf) ); + cprintf("server_name, sizeof xmlbuf) ); + cprintf("