mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
mod_carboncopy: Apply small code simplification
This commit is contained in:
parent
bc7f93ad1e
commit
e87d332394
@ -171,14 +171,10 @@ send_copies(JID, To, Packet, Direction)->
|
|||||||
_ -> {0, undefined}
|
_ -> {0, undefined}
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
%% unavailable resources are handled like bare JIDs
|
||||||
IsBareTo = case {Direction, To} of
|
IsBareTo = case {Direction, To} of
|
||||||
{received, #jid{lresource = <<>>}} -> true;
|
{received, #jid{lresource = <<>>}} -> true;
|
||||||
{received, #jid{lresource = LRes}} ->
|
{received, #jid{lresource = LRes}} -> not lists:member(LRes, AvailRs);
|
||||||
%% unavailable resources are handled like bare JIDs
|
|
||||||
case lists:keyfind(LRes, 2, PrioRes) of
|
|
||||||
false -> true;
|
|
||||||
_ -> false
|
|
||||||
end;
|
|
||||||
_ -> false
|
_ -> false
|
||||||
end,
|
end,
|
||||||
%% list of JIDs that should receive a carbon copy of this message (excluding the
|
%% list of JIDs that should receive a carbon copy of this message (excluding the
|
||||||
|
Loading…
Reference in New Issue
Block a user