aboutsummaryrefslogtreecommitdiff
path: root/src/mod_offline.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_offline.erl')
-rw-r--r--src/mod_offline.erl18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mod_offline.erl b/src/mod_offline.erl
index c3fda25db..1d367eb72 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.
@@ -1315,19 +1325,19 @@ mod_doc() ->
{db_type,
#{value => "mnesia | sql",
desc =>
- ?T("Same as top-level 'default_db' option, but applied to this module only.")}},
+ ?T("Same as top-level _`default_db`_ option, but applied to this module only.")}},
{use_cache,
#{value => "true | false",
desc =>
- ?T("Same as top-level 'use_cache' option, but applied to this module only.")}},
+ ?T("Same as top-level _`use_cache`_ option, but applied to this module only.")}},
{cache_size,
#{value => "pos_integer() | infinity",
desc =>
- ?T("Same as top-level 'cache_size' option, but applied to this module only.")}},
+ ?T("Same as top-level _`cache_size`_ option, but applied to this module only.")}},
{cache_life_time,
#{value => "timeout()",
desc =>
- ?T("Same as top-level 'cache_life_time' option, but applied to this module only.")}}],
+ ?T("Same as top-level _`cache_life_time`_ option, but applied to this module only.")}}],
example =>
[{?T("This example allows power users to have as much as 5000 "
"offline messages, administrators up to 2000, and all the "