about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/windows.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/windows.c b/src/windows.c
index 06fab840..f281be24 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -725,7 +725,16 @@ win_new_chat_win(const char * const to)
 
     // create new window
     if (win_index == NUM_WINS) {
-        win_index = _new_prof_win(to, WIN_CHAT);
+        Jid *jid = jid_create(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()) {