From: Evgeniy Khramtsov Date: Sat, 12 Nov 2016 11:47:29 +0000 (+0300) Subject: Revert "Support to provide password when subscribing to a room (#1306)" X-Git-Tag: 16.12-beta1~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de81c501992bc5535ef2b0dbe37547c9f3754a73;p=ejabberd Revert "Support to provide password when subscribing to a room (#1306)" This reverts commit 566ac872fe396a6d41296d9cfbc6ed5859a0eeed. --- diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index e31ec6b0f..c83565734 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -3735,8 +3735,7 @@ process_iq_mucsub(From, NewStateData = set_subscriber(From, Nick, Nodes, StateData), {result, subscribe_result(Packet), NewStateData}; error -> - Packet2 = copy_password_xelement(Packet), - add_new_user(From, Nick, Packet2, StateData) + add_new_user(From, Nick, Packet, StateData) end; process_iq_mucsub(From, #iq{type = set, sub_els = [#muc_unsubscribe{}]}, StateData) -> @@ -3771,11 +3770,6 @@ process_iq_mucsub(_From, #iq{type = get, lang = Lang}, _StateData) -> Txt = <<"Value 'get' of 'type' attribute is not allowed">>, {error, xmpp:err_bad_request(Txt, Lang)}. -copy_password_xelement(Packet) -> - SubsEl = fxml:get_subtag_with_xmlns(Packet, <<"subscribe">>, ?NS_MUCSUB), - XEl = fxml:get_subtag_with_xmlns(SubsEl, <<"x">>, ?NS_MUC), - fxml:append_subtags(Packet, [XEl]). - remove_subscriptions(StateData) -> if not (StateData#state.config)#config.allow_subscription -> StateData#state{subscribers = ?DICT:new(),