aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvesvalo <vesvalo@mail.ru>2014-08-08 13:57:27 +0400
committervesvalo <vesvalo@mail.ru>2014-08-08 13:57:27 +0400
commit436f0832c1d7cdd98c6629977d41700e5aa7e589 (patch)
tree4e0986aa023fab8117050f819f455c158127aed1 /src
parentFix odbc update_t and update insert case return value (diff)
fix mod_offline to store only chat messages with body xml element
Diffstat (limited to 'src')
-rw-r--r--src/mod_offline.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mod_offline.erl b/src/mod_offline.erl
index bb488f8c5..95c5881df 100644
--- a/src/mod_offline.erl
+++ b/src/mod_offline.erl
@@ -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