mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-24 17:29:28 +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}
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user