diff libpurple/protocols/gg/gg.c @ 21061:1d92b85ef5d9

gg: Properly display your status in the buddylist.
author Bartoz Oler <bartosz@pidgin.im>
date Sun, 04 Nov 2007 22:17:45 +0000
parents 3cc856ca2338
children 6de09629f091
line wrap: on
line diff
--- a/libpurple/protocols/gg/gg.c	Fri Nov 02 06:59:04 2007 +0000
+++ b/libpurple/protocols/gg/gg.c	Sun Nov 04 22:17:45 2007 +0000
@@ -828,6 +828,7 @@
 {
 	GGPInfo *info = gc->proto_data;
 	PurpleRequestField *field;
+	/* TODO: sel may be null. */
 	GList *sel;
 
 	field = purple_request_fields_get_field(fields, "name");
@@ -1868,15 +1869,24 @@
 		gg_change_status_descr(info->session, new_status_descr, new_msg);
 		g_free(new_msg);
 	}
+
+	ggp_status_fake_to_self(account);
+
 }
 /* }}} */
 
 /* static void ggp_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) {{{ */
 static void ggp_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
 {
+	PurpleAccount *account;
 	GGPInfo *info = gc->proto_data;
 
 	gg_add_notify(info->session, ggp_str_to_uin(buddy->name));
+
+	account = purple_connection_get_account(gc);
+	if (strcmp(purple_account_get_username(account), buddy->name) == 0) {
+		ggp_status_fake_to_self(account);
+	}
 }
 /* }}} */