aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mod_offline.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mod_offline.erl b/src/mod_offline.erl
index c3fda25db..ff95767b6 100644
--- a/src/mod_offline.erl
+++ b/src/mod_offline.erl
@@ -572,6 +572,16 @@ check_event(#message{from = From, to = To, id = ID, type = Type} = Msg) ->
sub_els = [#xevent{id = ID, offline = true}]},
ejabberd_router:route(NewMsg),
true;
+ % Don't store composing events
+ #xevent{id = V, composing = true} when V /= undefined ->
+ false;
+ % Nor composing stopped events
+ #xevent{id = V, composing = false, delivered = false,
+ displayed = false, offline = false} when V /= undefined ->
+ false;
+ % But store other received notifications
+ #xevent{id = V} when V /= undefined ->
+ true;
_ ->
false
end.