]> granicus.if.org Git - ejabberd/commitdiff
Revert "Support to provide password when subscribing to a room (#1306)"
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Sat, 12 Nov 2016 11:47:29 +0000 (14:47 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Sat, 12 Nov 2016 11:47:29 +0000 (14:47 +0300)
This reverts commit 566ac872fe396a6d41296d9cfbc6ed5859a0eeed.

src/mod_muc_room.erl

index e31ec6b0fd39be66e62a511fe7178bc5ac0a4cde..c83565734917736a3ff7f5e8ada7f89e93f64acd 100644 (file)
@@ -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(),