25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Fix get_affiliation/2

This commit is contained in:
Evgeniy Khramtsov 2018-04-24 12:07:10 +03:00
parent 5b730cdbf2
commit ca28faa51a

View File

@ -1312,8 +1312,8 @@ set_affiliations(Affiliations, StateData) ->
set_affiliations_fallback(Affiliations, StateData) ->
StateData#state{affiliations = Affiliations}.
-spec get_affiliation(jid(), state()) -> affiliation().
get_affiliation(JID, StateData) ->
-spec get_affiliation(ljid() | jid(), state()) -> affiliation().
get_affiliation(#jid{} = JID, StateData) ->
case get_service_affiliation(JID, StateData) of
owner ->
owner;
@ -1322,7 +1322,9 @@ get_affiliation(JID, StateData) ->
{Affiliation, _Reason} -> Affiliation;
Affiliation -> Affiliation
end
end.
end;
get_affiliation(LJID, StateData) ->
get_affiliation(jid:make(LJID), StateData).
-spec do_get_affiliation(jid(), state()) -> affiliation().
do_get_affiliation(JID, #state{config = #config{persistent = false}} = StateData) ->