about summary refs log tree commit diff stats
path: root/src/command/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/commands.c')
-rw-r--r--src/command/commands.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 8e026b50..0a96d318 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -1591,9 +1591,10 @@ cmd_join(gchar **args, struct cmd_help_t help)
 
     if (!muc_room_is_active(room)) {
         presence_join_room(room, nick, passwd);
+        muc_join_room(room, nick, passwd, FALSE);
+    } else if (muc_get_roster_received(room)) {
+        ui_room_join(room, TRUE);
     }
-    ui_room_join(room, TRUE);
-    muc_remove_invite(room);
 
     jid_destroy(room_arg);
     g_string_free(room_str, TRUE);