From 59e9b10d191881c2cc344616c5b788cf056da616 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 10 Feb 2013 13:36:11 +0000 Subject: Removed presence from jabber_conn --- src/command/command.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/command') diff --git a/src/command/command.c b/src/command/command.c index d1bc4ae4..3c8ea33c 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -1198,8 +1198,9 @@ _cmd_account(gchar **args, struct cmd_help_t help) break; } jabber_conn_status_t conn_status = jabber_get_connection_status(); - if (conn_status == JABBER_CONNECTED && presence_type == jabber_get_presence_type()) { - presence_update(jabber_get_presence_type(), jabber_get_presence_message(), 0); + presence_t last_presence = accounts_get_last_presence(jabber_get_account_name()); + if (conn_status == JABBER_CONNECTED && presence_type == last_presence) { + presence_update(last_presence, jabber_get_presence_message(), 0); } cons_show("Updated %s priority for account %s: %s", property, account_name, value); cons_show(""); @@ -2238,9 +2239,8 @@ _cmd_set_priority(gchar **args, struct cmd_help_t help) if (_strtoi(value, &intval, -128, 127) == 0) { accounts_set_priority_all(jabber_get_account_name(), intval); - //prefs_set_priority((int)intval); - // update presence with new priority - presence_update(jabber_get_presence_type(), jabber_get_presence_message(), 0); + presence_t last_presence = accounts_get_last_presence(jabber_get_account_name()); + presence_update(last_presence, jabber_get_presence_message(), 0); cons_show("Priority set to %d.", intval); } -- cgit 1.4.1-2-gfad0