changeset 18154:08e639dbac99

really and truly enforce the no-presence-before-roster thing
author Nathan Walp <nwalp@pidgin.im>
date Sun, 17 Jun 2007 05:14:45 +0000
parents 7f23135d9b68
children 094698b04630 3a1a9e8c1506
files libpurple/protocols/jabber/presence.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c	Sun Jun 17 05:10:35 2007 +0000
+++ b/libpurple/protocols/jabber/presence.c	Sun Jun 17 05:14:45 2007 +0000
@@ -120,6 +120,12 @@
 	gc = purple_account_get_connection(account);
 	js = gc->proto_data;
 
+	/* we don't want to send presence before we've gotten our roster */
+	if(!js->roster_parsed) {
+		purple_debug_info("jabber", "attempt to send presence before roster retrieved\n");
+		return;
+	}
+
 	purple_status_to_jabber(status, &state, &stripped, &priority);