diff libpurple/protocols/jabber/buddy.c @ 24564:5f597914cd01

Don't try to get info for MUC's. Allow getting info for regular JID's and room particpant JID's. Fixes #6648. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author Paul Aurich <paul@darkrain42.org>
date Sat, 29 Nov 2008 19:35:13 +0000
parents df9f962aa907
children 915b1cafa3d1 f47429b5ab52 6f94b4a27372 aa1fe87558d8
line wrap: on
line diff
--- a/libpurple/protocols/jabber/buddy.c	Sat Nov 29 18:20:58 2008 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Sat Nov 29 19:35:13 2008 +0000
@@ -1802,12 +1802,21 @@
 void jabber_buddy_get_info(PurpleConnection *gc, const char *who)
 {
 	JabberStream *js = gc->proto_data;
-	char *bare_jid = jabber_get_bare_jid(who);
+	JabberID *jid = jabber_id_new(who);
+
+	if (!jid)
+		return;
 
-	if(bare_jid) {
+	if (jabber_chat_find(js, jid->node, jid->domain)) {
+		/* For a conversation, include the resource (indicates the user). */
+		jabber_buddy_get_info_for_jid(js, who);
+	} else {
+		char *bare_jid = jabber_get_bare_jid(who);
 		jabber_buddy_get_info_for_jid(js, bare_jid);
 		g_free(bare_jid);
 	}
+
+	jabber_id_free(jid);
 }
 
 static void jabber_buddy_set_invisibility(JabberStream *js, const char *who,