From eac7a77b6a7847e03a496372287efcbb7dcb9e7d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pawe=C5=82=20Chmielowski?= Date: Tue, 30 Apr 2019 17:34:49 +0200 Subject: [PATCH] Fix room state cleanup from db on change of persistent option change --- src/mod_muc_room.erl | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index 2e3c2f146..f972a5feb 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -3486,15 +3486,13 @@ change_config(Config, StateData) -> end, store_room(StateData1), StateData1; - {WasPersistent, false} -> - maybe_forget_room(StateData1), - case WasPersistent of - true -> - Affiliations = get_affiliations(StateData), - StateData1#state{affiliations = Affiliations}; - _ -> - StateData1 - end + {true, false} -> + Affiliations = get_affiliations(StateData), + maybe_forget_room(StateData), + StateData1#state{affiliations = Affiliations}; + _ -> + maybe_forget_room(StateData), + StateData1 end, case {(StateData#state.config)#config.members_only, Config#config.members_only} of -- 2.40.0