mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Expand rule "mucsub subscribers are members in members only rooms" to more places
This commit is contained in:
parent
1818a29c29
commit
4a53d4cb56
@ -1695,13 +1695,23 @@ set_affiliations_fallback(Affiliations, StateData) ->
|
|||||||
-spec get_affiliation(ljid() | jid(), state()) -> affiliation().
|
-spec get_affiliation(ljid() | jid(), state()) -> affiliation().
|
||||||
get_affiliation(#jid{} = JID, StateData) ->
|
get_affiliation(#jid{} = JID, StateData) ->
|
||||||
case get_service_affiliation(JID, StateData) of
|
case get_service_affiliation(JID, StateData) of
|
||||||
owner ->
|
owner ->
|
||||||
owner;
|
owner;
|
||||||
none ->
|
none ->
|
||||||
case do_get_affiliation(JID, StateData) of
|
Aff = case do_get_affiliation(JID, StateData) of
|
||||||
{Affiliation, _Reason} -> Affiliation;
|
{Affiliation, _Reason} -> Affiliation;
|
||||||
Affiliation -> Affiliation
|
Affiliation -> Affiliation
|
||||||
end
|
end,
|
||||||
|
case {Aff, (StateData#state.config)#config.members_only} of
|
||||||
|
% Subscribers should be have members affiliation in this case
|
||||||
|
{none, true} ->
|
||||||
|
case is_subscriber(JID, StateData) of
|
||||||
|
true -> member;
|
||||||
|
_ -> none
|
||||||
|
end;
|
||||||
|
_ ->
|
||||||
|
Aff
|
||||||
|
end
|
||||||
end;
|
end;
|
||||||
get_affiliation(LJID, StateData) ->
|
get_affiliation(LJID, StateData) ->
|
||||||
get_affiliation(jid:make(LJID), StateData).
|
get_affiliation(jid:make(LJID), StateData).
|
||||||
|
Loading…
Reference in New Issue
Block a user