diff src/protocols/jabber/jabber.c @ 8400:0383e55cd658

[gaim-migrate @ 9129] the ietf docs say we SHOULD do this, so we will. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 05 Mar 2004 19:09:59 +0000
parents 681b1661ee8b
children c13a4913a071
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c	Fri Mar 05 16:37:37 2004 +0000
+++ b/src/protocols/jabber/jabber.c	Fri Mar 05 19:09:59 2004 +0000
@@ -1169,6 +1169,27 @@
 	return NULL;
 }
 
+static void jabber_convo_closed(GaimConnection *gc, const char *who)
+{
+	JabberStream *js = gc->proto_data;
+	JabberID *jid;
+	JabberBuddy *jb;
+	JabberBuddyResource *jbr;
+
+	if(!(jid = jabber_id_new(who)))
+		return;
+
+	if((jb = jabber_buddy_find(js, who, TRUE)) &&
+			(jbr = jabber_buddy_find_resource(jb, jid->resource))) {
+		if(jbr->thread_id) {
+			g_free(jbr->thread_id);
+			jbr->thread_id = NULL;
+		}
+	}
+
+	jabber_id_free(jid);
+}
+
 static GaimPluginProtocolInfo prpl_info =
 {
 	OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME,
@@ -1219,7 +1240,7 @@
 	jabber_roster_group_change,
 	jabber_roster_group_rename,
 	NULL,
-	NULL, /* convo_closed */
+	jabber_convo_closed,
 	jabber_normalize,
 	NULL, /* set_buddy_icon */
 	NULL, /* remove_group */