diff libpurple/protocols/jabber/usermood.c @ 29440:1fb503adb2ae

Move the mood UI for ICQ into Pidgin. It still uses the new request API stuff, which needs to be replaced. Then it needs to replace the XMPP UI.
author Richard Laager <rlaager@wiktel.com>
date Mon, 17 Nov 2008 07:30:43 +0000
parents 432d9176d054
children 086b26f60913
line wrap: on
line diff
--- a/libpurple/protocols/jabber/usermood.c	Mon Nov 17 04:18:05 2008 +0000
+++ b/libpurple/protocols/jabber/usermood.c	Mon Nov 17 07:30:43 2008 +0000
@@ -150,15 +150,12 @@
 		}
 	}
 	if (newmood != NULL) {
-		const char *status_id;
-		JabberBuddyResource *resource = jabber_buddy_find_resource(buddy, NULL);
-		if(!resource) { /* huh? */
-			g_free(moodtext);
-			return;
-		}
-		status_id = jabber_buddy_state_get_status_id(resource->state);
-
-		purple_prpl_got_user_status(js->gc->account, from, status_id, "mood", _(newmood), "moodtext", moodtext?moodtext:"", NULL);
+		purple_prpl_got_user_status(js->gc->account, from, "mood",
+				PURPLE_MOOD_NAME, mood,
+				PURPLE_MOOD_COMMENT, moodtext,
+				NULL);
+	} else {
+		purple_prpl_got_user_status_deactive(js->gc->account, from, "mood");
 	}
 	g_free(moodtext);
 }