about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-02-10 13:36:11 +0000
committerJames Booth <boothj5@gmail.com>2013-02-10 13:36:11 +0000
commit59e9b10d191881c2cc344616c5b788cf056da616 (patch)
treeb8191fbd28585ddb106acdd897aea0e104952cb8 /src/command
parent4cb77272f34f5259b3621f1ce14b6667a75f2e13 (diff)
downloadprofani-tty-59e9b10d191881c2cc344616c5b788cf056da616.tar.gz
Removed presence from jabber_conn
Diffstat (limited to 'src/command')
-rw-r--r--src/command/command.c10
1 files changed, 5 insertions, 5 deletions
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);
     }