summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mod_muc_room.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl
index c5c0c0fa..07689db1 100644
--- a/src/mod_muc_room.erl
+++ b/src/mod_muc_room.erl
@@ -2024,8 +2024,11 @@ check_captcha(Affiliation, From, StateData) ->
-spec extract_password(stanza()) -> binary() | false.
extract_password(Packet) ->
- case xmpp:get_subtag(Packet, #muc{}) of
- #muc{password = Password} when is_binary(Password) ->
+ case {xmpp:get_subtag(Packet, #muc{}),
+ xmpp:get_subtag(Packet, #muc_subscribe{})} of
+ {#muc{password = Password}, _} when is_binary(Password) ->
+ Password;
+ {_, #muc_subscribe{password = Password}} when is_binary(Password) ->
Password;
_ ->
false