about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-05-19 23:44:28 +0100
committerJames Booth <boothj5@gmail.com>2013-05-19 23:44:28 +0100
commitf8121cc546fd95e2e6348cd0fa77e748939d90cf (patch)
tree0799fd040b656ce71761e0ff96c1a886d80e3f3e
parent59a3a5fe9b579bf76caf594c934fd1a8a9cb46ac (diff)
downloadprofani-tty-f8121cc546fd95e2e6348cd0fa77e748939d90cf.tar.gz
Use handle for /info command
-rw-r--r--src/command/command.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 53bc39c0..7d65b466 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -2114,6 +2114,7 @@ static gboolean
 _cmd_info(gchar **args, struct cmd_help_t help)
 {
     char *usr = args[0];
+    char *usr_jid = NULL;
 
     jabber_conn_status_t conn_status = jabber_get_connection_status();
     win_type_t win_type = ui_current_win_type();
@@ -2166,7 +2167,11 @@ _cmd_info(gchar **args, struct cmd_help_t help)
             break;
         case WIN_CONSOLE:
             if (usr != NULL) {
-                pcontact = roster_get_contact(usr);
+                usr_jid = roster_jid_from_handle(usr);
+                if (usr_jid == NULL) {
+                    usr_jid = usr;
+                }
+                pcontact = roster_get_contact(usr_jid);
                 if (pcontact != NULL) {
                     cons_show_info(pcontact);
                 } else {