about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-06-10 23:18:43 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-06-10 23:18:43 +0200
commitff6038fe3297947eec6ebf883e91e79a6f9a0386 (patch)
treecec64c18571d2912499ec4af7d08b0f2018152c5 /src
parentc4fcc0c3cb146e98ec7854b177a2f1869b913b99 (diff)
downloadprofani-tty-ff6038fe3297947eec6ebf883e91e79a6f9a0386.tar.gz
Rejoin all MUCs on reconnect
Should fix https://github.com/profanity-im/profanity/issues/1120
Diffstat (limited to 'src')
-rw-r--r--src/event/server_events.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c
index b76f7cfa..7b57ef4b 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -87,15 +87,13 @@ sv_ev_login_account_success(char *account_name, gboolean secured)
 
     ui_handle_login_account_success(account, secured);
 
-    // attempt to rejoin rooms with passwords
+    // attempt to rejoin all rooms
     GList *rooms = muc_rooms();
     GList *curr = rooms;
     while (curr) {
         char *password = muc_password(curr->data);
-        if (password) {
-            char *nick = muc_nick(curr->data);
-            presence_join_room(curr->data, nick, password);
-        }
+        char *nick = muc_nick(curr->data);
+        presence_join_room(curr->data, nick, password);
         curr = g_list_next(curr);
     }
     g_list_free(rooms);