Add password support in muc_subscribe (#1306)
This commit is contained in:
parent
d7e1f6d7b3
commit
847376924e
|
@ -2024,8 +2024,11 @@ check_captcha(Affiliation, From, StateData) ->
|
||||||
|
|
||||||
-spec extract_password(stanza()) -> binary() | false.
|
-spec extract_password(stanza()) -> binary() | false.
|
||||||
extract_password(Packet) ->
|
extract_password(Packet) ->
|
||||||
case xmpp:get_subtag(Packet, #muc{}) of
|
case {xmpp:get_subtag(Packet, #muc{}),
|
||||||
#muc{password = Password} when is_binary(Password) ->
|
xmpp:get_subtag(Packet, #muc_subscribe{})} of
|
||||||
|
{#muc{password = Password}, _} when is_binary(Password) ->
|
||||||
|
Password;
|
||||||
|
{_, #muc_subscribe{password = Password}} when is_binary(Password) ->
|
||||||
Password;
|
Password;
|
||||||
_ ->
|
_ ->
|
||||||
false
|
false
|
||||||
|
|
Loading…
Reference in New Issue