]> granicus.if.org Git - ejabberd/commitdiff
Check message subject in mod_block_strangers
authorAlexey Shchepin <alexey@process-one.net>
Mon, 23 Jan 2017 14:10:28 +0000 (17:10 +0300)
committerAlexey Shchepin <alexey@process-one.net>
Mon, 23 Jan 2017 14:10:28 +0000 (17:10 +0300)
src/mod_block_strangers.erl

index c304f20d57455392860877db150dbe0b6a8b6147..383848724e36563eb77658b2e3e7e104cd1ea578 100644 (file)
@@ -55,7 +55,8 @@ filter_packet({#message{} = Msg, State} = Acc) ->
     LFrom = jid:tolower(From),
     LBFrom = jid:remove_resource(LFrom),
     #{pres_a := PresA} = State,
-    case Msg#message.body == []
+    case (Msg#message.body == [] andalso
+          Msg#message.subject == [])
         orelse ejabberd_router:is_my_route(From#jid.lserver)
         orelse (?SETS):is_element(LFrom, PresA)
        orelse (?SETS):is_element(LBFrom, PresA)