mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 01:39:35 +02:00
Add password support in muc_subscribe (#1306)
This commit is contained in:
parent
d7e1f6d7b3
commit
847376924e
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue