diff options
author | Paweł Chmielowski <pawel@process-one.net> | 2021-08-04 15:30:29 +0200 |
---|---|---|
committer | Paweł Chmielowski <pawel@process-one.net> | 2021-08-04 15:30:29 +0200 |
commit | d7e330c8eff3bb40a301705bfab7a9510b2c6fc5 (patch) | |
tree | 68c8a7e0b189bea63244d9cf1fd7f959e109bd2d /src/mod_offline.erl | |
parent | mod_pubsub: Fix check_opt_range/3 spec (diff) |
Allow storing non-composing x:events in offline
Diffstat (limited to 'src/mod_offline.erl')
-rw-r--r-- | src/mod_offline.erl | 10 |
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. |