changeset 18123:ca965dfd3875

kill some code duplication when sending current presence
author Nathan Walp <nwalp@pidgin.im>
date Sun, 17 Jun 2007 04:44:03 +0000
parents 74b5a39819e6
children f88c2a41200d
files libpurple/protocols/jabber/presence.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c	Sat Jun 16 20:59:41 2007 +0000
+++ b/libpurple/protocols/jabber/presence.c	Sun Jun 17 04:44:03 2007 +0000
@@ -102,6 +102,11 @@
 	JabberBuddyState state;
 	int priority;
 
+	if(NULL == status) {
+		PurplePresence *gpresence = purple_account_get_presence(account);
+		status = purple_presence_get_active_status(gpresence);
+	}
+
 	if(!purple_status_is_active(status))
 		return;