diff options
author | Michael Vetter <jubalh@iodoru.org> | 2019-09-29 14:58:25 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2019-09-29 14:58:25 +0200 |
commit | 0f732466f8979a592e4028a0e16799e653702fc2 (patch) | |
tree | e40829f3ab9543fc6b9b7f14e789d8f0046da17f /src/command/cmd_funcs.c | |
parent | 49b69c883f00bc4926df616f42268225d0185eab (diff) | |
download | profani-tty-0f732466f8979a592e4028a0e16799e653702fc2.tar.gz |
Allow pasing a jid to status command in chat window
Regards https://github.com/profanity-im/profanity/issues/1194
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r-- | src/command/cmd_funcs.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index eba9aa83..1a3cca40 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -3246,7 +3246,11 @@ cmd_status(ProfWin *window, const char *const command, gchar **args) break; case WIN_CHAT: if (usr) { - win_println(window, THEME_DEFAULT, '-', "No parameter required when in chat."); + char *usr_jid = roster_barejid_from_name(usr); + if (usr_jid == NULL) { + usr_jid = usr; + } + cons_show_status(usr_jid); } else { ProfChatWin *chatwin = (ProfChatWin*)window; assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK); @@ -3260,7 +3264,11 @@ cmd_status(ProfWin *window, const char *const command, gchar **args) break; case WIN_PRIVATE: if (usr) { - win_println(window, THEME_DEFAULT, '-', "No parameter required when in chat."); + char *usr_jid = roster_barejid_from_name(usr); + if (usr_jid == NULL) { + usr_jid = usr; + } + cons_show_status(usr_jid); } else { ProfPrivateWin *privatewin = (ProfPrivateWin*)window; assert(privatewin->memcheck == PROFPRIVATEWIN_MEMCHECK); |