changeset 9744:9a17c90ba190

[gaim-migrate @ 10609] (00:37:06) datallah: LSchiere: since you just got here.. (and i got no action from KingAnt) http://www.butfer.com/gaim-patches/jabber_self_fake_fix.patch fixes (00:37:06) datallah: 1006831 committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 12 Aug 2004 04:41:18 +0000
parents bce36da0069a
children bd6c7317935c
files src/protocols/jabber/presence.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/presence.c	Thu Aug 12 01:11:54 2004 +0000
+++ b/src/protocols/jabber/presence.c	Thu Aug 12 04:41:18 2004 +0000
@@ -70,11 +70,18 @@
 				else if(!strcmp(away_state, _("Do Not Disturb")))
 					state = JABBER_STATE_DND;
 			}
-			jabber_buddy_track_resource(jb, js->user->resource, 0, state, (msg && *msg) ? msg : NULL);
+		       
+			if (away_state && !strcmp(away_state, "unavailable")) {
+				jabber_buddy_remove_resource(jb, js->user->resource);
+			} else {
+				jabber_buddy_track_resource(jb, js->user->resource, 0, state, (msg && *msg) ? msg : NULL);
+			}
 			if((jbr = jabber_buddy_find_resource(jb, NULL)))
 				serv_got_update(js->gc, my_base_jid,
 						away_state ? !strcmp(away_state, "unavailable") : 1,
 						0, 0, 0, jbr->state);
+			else
+				serv_got_update(js->gc, my_base_jid, 0, 0, 0, 0, 0);
 		}
 	}
 	g_free(my_base_jid);