1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Start chat session on /msg with no message parameter

fixes #173
This commit is contained in:
James Booth 2013-06-20 17:50:20 +01:00
parent b9fc61fd30
commit 1cf20b2491

View File

@ -2118,6 +2118,20 @@ _cmd_msg(gchar **args, struct cmd_help_t help)
return TRUE; return TRUE;
} else { } else {
const char * jid = NULL;
if (roster_barejid_from_name(usr_jid) != NULL) {
jid = roster_barejid_from_name(usr_jid);
} else {
jid = usr_jid;
}
if (prefs_get_boolean(PREF_STATES)) {
if (!chat_session_exists(jid)) {
chat_session_start(jid, TRUE);
}
}
ui_new_chat_win(usr_jid); ui_new_chat_win(usr_jid);
return TRUE; return TRUE;
} }