]> granicus.if.org Git - ejabberd/commitdiff
fix mod_offline to store only chat messages with body xml element
authorvesvalo <vesvalo@mail.ru>
Fri, 8 Aug 2014 09:57:27 +0000 (13:57 +0400)
committervesvalo <vesvalo@mail.ru>
Fri, 8 Aug 2014 09:57:27 +0000 (13:57 +0400)
src/mod_offline.erl

index bb488f8c55212c6af4b77c04972bad6d9dd2c7a3..95c5881dfbcb3ad4a07cdaa50a34691a2341cec8 100644 (file)
@@ -296,8 +296,9 @@ get_sm_features(Acc, _From, _To, _Node, _Lang) ->
 
 store_packet(From, To, Packet) ->
     Type = xml:get_tag_attr_s(<<"type">>, Packet),
+       BodyElem = xml:get_path_s(Packet,[{elem, <<"body">>}]),
     if (Type /= <<"error">>) and (Type /= <<"groupchat">>)
-        and (Type /= <<"headline">>) ->
+        and (Type /= <<"headline">>) and (<<>> /= BodyElem) ->
           case has_no_storage_hint(Packet) of
             false ->
                 case check_event(From, To, Packet) of