diff options
Diffstat (limited to 'src/windows.c')
-rw-r--r-- | src/windows.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/windows.c b/src/windows.c index ccba1631..28b63c74 100644 --- a/src/windows.c +++ b/src/windows.c @@ -753,13 +753,16 @@ win_show_outgoing_msg(const char * const from, const char * const to, // create new window if (win_index == NUM_WINS) { + Jid *jid = jid_create(to); - if (muc_room_is_active(to)) { + if (muc_room_is_active(jid)) { win_index = _new_prof_win(to, WIN_PRIVATE); } else { win_index = _new_prof_win(to, WIN_CHAT); } + jid_destroy(jid); + win = windows[win_index]->win; if (prefs_get_chlog() && prefs_get_history()) { @@ -794,13 +797,13 @@ win_show_outgoing_msg(const char * const from, const char * const to, } void -win_join_chat(const char * const room, const char * const nick) +win_join_chat(Jid *jid) { - int win_index = _find_prof_win_index(room); + int win_index = _find_prof_win_index(jid->barejid); // create new window if (win_index == NUM_WINS) { - win_index = _new_prof_win(room, WIN_MUC); + win_index = _new_prof_win(jid->barejid, WIN_MUC); } ui_switch_win(win_index); |