about summary refs log tree commit diff stats
path: root/src/command/command.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-05-30 21:18:32 +0100
committerJames Booth <boothj5@gmail.com>2013-05-30 21:18:32 +0100
commitd02e6a82fafd0b674a59226d9091696dd8b26cc6 (patch)
tree7d91bd0662f2396b1b3481210677d7eef805e9f3 /src/command/command.c
parentdcd8dcda87a7e942612e986f7dd13f2cc230df23 (diff)
downloadprofani-tty-d02e6a82fafd0b674a59226d9091696dd8b26cc6.tar.gz
Use nickname to jid mapping when sending room invites
Diffstat (limited to 'src/command/command.c')
-rw-r--r--src/command/command.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/command/command.c b/src/command/command.c
index d6c8f8b3..d181f48a 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -2403,8 +2403,12 @@ _cmd_invite(gchar **args, struct cmd_help_t help)
         return TRUE;
     }
 
+    char *usr_jid = roster_barejid_from_name(contact);
+    if (usr_jid == NULL) {
+        usr_jid = contact;
+    }
     room = ui_current_recipient();
-    message_send_invite(room, contact, reason);
+    message_send_invite(room, usr_jid, reason);
     if (reason != NULL) {
         cons_show("Room invite sent, contact: %s, room: %s, reason: \"%s\".",
             contact, room, reason);