]> granicus.if.org Git - ejabberd/commitdiff
mod_carboncopy: Apply cosmetic change
authorHolger Weiss <holger@zedat.fu-berlin.de>
Wed, 21 Feb 2018 23:46:47 +0000 (00:46 +0100)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Wed, 21 Feb 2018 23:46:47 +0000 (00:46 +0100)
The xmpp:has_subtag/2 function returns a boolen() value, so it can be
used with the 'not' operator.

src/mod_carboncopy.erl

index 8794e4087a5d1b4b50b7234e9cab34900a2dae18..5b7983ddf142e6c0065997efe365dcbbe122b5d2 100644 (file)
@@ -165,8 +165,8 @@ user_receive_packet({Packet, #{jid := JID} = C2SState}) ->
 check_and_forward(JID, To, Packet, Direction)->
     case is_chat_message(Packet) andalso
        not is_received_muc_pm(To, Packet, Direction) andalso
-       xmpp:has_subtag(Packet, #carbons_private{}) == false andalso
-       xmpp:has_subtag(Packet, #hint{type = 'no-copy'}) == false of
+       not xmpp:has_subtag(Packet, #carbons_private{}) andalso
+       not xmpp:has_subtag(Packet, #hint{type = 'no-copy'}) of
        true ->
            case is_carbon_copy(Packet) of
                false ->