# HG changeset patch # User Mikael Berthe # Date 1267129575 -3600 # Node ID 98d99485d27635a8411f8b8a142df0dfecda583c # Parent f3c5e1175b22dcb5bc4164f454396c3d321bcd46 Do not use the full JID for vcard requests (Hermitifier) diff -r f3c5e1175b22 -r 98d99485d276 mcabber/mcabber/commands.c --- a/mcabber/mcabber/commands.c Thu Feb 25 21:21:43 2010 +0100 +++ b/mcabber/mcabber/commands.c Thu Feb 25 21:26:15 2010 +0100 @@ -3227,7 +3227,7 @@ static void do_request(char *arg) { char **paramlst; - char *fjid, *type; + char *fjid, *type, *tmp; enum iqreq_type numtype = iqreq_none; char *jid_utf8 = NULL; @@ -3289,10 +3289,13 @@ if (fjid) { switch (numtype) { + case iqreq_vcard: + // vCards requests are done to bare jid + tmp = strchr(fjid, JID_RESOURCE_SEPARATOR); + if (tmp) *tmp = '\0'; case iqreq_version: case iqreq_time: case iqreq_last: - case iqreq_vcard: case iqreq_ping: xmpp_request(fjid, numtype); break; diff -r f3c5e1175b22 -r 98d99485d276 mcabber/mcabber/xmpp.c --- a/mcabber/mcabber/xmpp.c Thu Feb 25 21:21:43 2010 +0100 +++ b/mcabber/mcabber/xmpp.c Thu Feb 25 21:26:15 2010 +0100 @@ -254,8 +254,9 @@ } else return; - if (strchr(fjid, JID_RESOURCE_SEPARATOR)) { + if (strchr(fjid, JID_RESOURCE_SEPARATOR) || reqtype == iqreq_vcard) { // This is a full JID + // Or a vCard request, resource should have been stripped before xmpp_iq_request(fjid, xmlns); scr_LogPrint(LPRINT_NORMAL, "Sent %s request to <%s>", strreqtype, fjid); return;