X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fxmpp%2Fxmpp_query_namespace.c;h=df7671798a280cbccf6f04756c08fb5845315ca0;hb=2dea277848e779e7a923c9b4c8b98414d41abbda;hp=805b5101eaf09506ac8b4d488b85329fc5748771;hpb=313ec8cd15d8b4b0490862ef294f3aaa6390172c;p=citadel.git diff --git a/citadel/modules/xmpp/xmpp_query_namespace.c b/citadel/modules/xmpp/xmpp_query_namespace.c index 805b5101e..df7671798 100644 --- a/citadel/modules/xmpp/xmpp_query_namespace.c +++ b/citadel/modules/xmpp/xmpp_query_namespace.c @@ -1,7 +1,7 @@ /* * Handle type situations (namespace queries) * - * Copyright (c) 2007-2009 by Art Cancro + * Copyright (c) 2007-2015 by Art Cancro and citadel.org * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3. @@ -78,12 +78,13 @@ void xmpp_iq_roster_query(void) struct CitContext *cptr; int nContexts, i; + syslog(LOG_DEBUG, "Roster push!"); cprintf(""); cptr = CtdlGetContextArray(&nContexts); if (cptr) { for (i=0; iclient_jid, sizeof(dom)); + char *slash = strchr(dom, '/'); + if (slash) { + *slash = 0; + } + } + else { + safestrncpy(dom, XMPP->client_jid, sizeof(dom)); // client is expecting to see the reply + if (IsEmptyStr(dom)) { // coming "from" the domain of the user's jid + 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("