about summary refs log tree commit diff stats
path: root/src/profanity.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-02-17 02:23:36 +0000
committerJames Booth <boothj5@gmail.com>2013-02-17 02:23:36 +0000
commit50b7edbfb5f244a58e61017335af215c14e98d7e (patch)
tree387bf91819b51e7e115e14dde35fc6a04d5db497 /src/profanity.c
parentbced3d4b36c2080b6dee2c2aa14b64c8cf405cc5 (diff)
downloadprofani-tty-50b7edbfb5f244a58e61017335af215c14e98d7e.tar.gz
Show fulljid when contact becomes unavailable
Diffstat (limited to 'src/profanity.c')
-rw-r--r--src/profanity.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/profanity.c b/src/profanity.c
index e17d2dc7..6f1da902 100644
--- a/src/profanity.c
+++ b/src/profanity.c
@@ -340,13 +340,15 @@ prof_handle_contact_offline(char *contact, char *resource, char *status)
     gboolean updated = contact_list_contact_offline(contact, resource, status);
 
     if (resource != NULL && updated) {
+        Jid *jid = jid_create_from_bare_and_resource(contact, resource);
         PContact result = contact_list_get_contact(contact);
         if (p_contact_subscription(result) != NULL) {
             if (strcmp(p_contact_subscription(result), "none") != 0) {
-                ui_contact_offline(contact, "offline", status);
+                ui_contact_offline(jid->fulljid, "offline", status);
                 win_current_page_off();
             }
         }
+        jid_destroy(jid);
     }
 }