25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

mod_carboncopy: Apply small code simplification

This commit is contained in:
Holger Weiss 2015-02-12 00:14:57 +01:00
parent bc7f93ad1e
commit e87d332394

View File

@ -171,14 +171,10 @@ send_copies(JID, To, Packet, Direction)->
_ -> {0, undefined}
end,
%% unavailable resources are handled like bare JIDs
IsBareTo = case {Direction, To} of
{received, #jid{lresource = <<>>}} -> true;
{received, #jid{lresource = LRes}} ->
%% unavailable resources are handled like bare JIDs
case lists:keyfind(LRes, 2, PrioRes) of
false -> true;
_ -> false
end;
{received, #jid{lresource = LRes}} -> not lists:member(LRes, AvailRs);
_ -> false
end,
%% list of JIDs that should receive a carbon copy of this message (excluding the