about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-02-17 00:05:57 +0000
committerJames Booth <boothj5@gmail.com>2013-02-17 00:05:57 +0000
commita84e4adee718fbff87cbcb5a82fcb9496d701211 (patch)
tree272fa913713628fd95e338d763777674111d69f7 /src/xmpp
parent6794fb8101e9947be44644ce7c525f264f16a11a (diff)
downloadprofani-tty-a84e4adee718fbff87cbcb5a82fcb9496d701211.tar.gz
Show all resources ordered by priority with /info command
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/iq.c2
-rw-r--r--src/xmpp/presence.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c
index 525c7cf3..9d0b43e9 100644
--- a/src/xmpp/iq.c
+++ b/src/xmpp/iq.c
@@ -144,7 +144,7 @@ _iq_handle_roster_result(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
                 pending_out = TRUE;
             }
 
-            gboolean added = contact_list_add(barejid, name, sub, pending_out);
+            gboolean added = contact_list_add(barejid, name, sub, NULL, pending_out);
 
             if (!added) {
                 log_warning("Attempt to add contact twice: %s", barejid);
diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c
index 5773e349..4d152a20 100644
--- a/src/xmpp/presence.c
+++ b/src/xmpp/presence.c
@@ -342,7 +342,7 @@ _unavailable_handler(xmpp_conn_t * const conn,
         status_str = NULL;
 
     if (strcmp(my_jid->barejid, from_jid->barejid) !=0) {
-        prof_handle_contact_offline(from_jid->barejid, "default", status_str);
+        prof_handle_contact_offline(from_jid->barejid, from_jid->resourcepart, status_str);
     }
 
     jid_destroy(my_jid);
@@ -422,7 +422,7 @@ _available_handler(xmpp_conn_t * const conn,
     if (strcmp(my_jid->barejid, from_jid->barejid) !=0) {
         // create the resource
         resource_presence_t presence = resource_presence_from_string(show_str);
-        Resource *resource = resource_new("default", presence,
+        Resource *resource = resource_new(from_jid->resourcepart, presence,
             status_str, priority, caps_key);
         prof_handle_contact_online(from_jid->barejid, resource, last_activity);
     }