The default value is \term{max\_user\_offline\_messages}.
Then you can define an access rule with a syntax similar to
\term{max\_user\_sessions} (see \ref{configmaxsessions}).
+ \titem{store\_empty\_body: true|false}\ind{options!store\_empty\_body} Whether or not
+ to store messages with empty \term{<body/>} element. The default value is \term{true}.
\end{description}
This example allows power users to have as much as 5000 offline messages,
get_sm_features(Acc, _From, _To, _Node, _Lang) ->
Acc.
-
-store_packet(From, To, Packet) ->
+need_to_store(LServer, Packet) ->
Type = xml:get_tag_attr_s(<<"type">>, Packet),
if (Type /= <<"error">>) and (Type /= <<"groupchat">>)
- and (Type /= <<"headline">>) ->
+ and (Type /= <<"headline">>) ->
+ case gen_mod:get_module_opt(
+ LServer, ?MODULE, store_empty_body,
+ fun(V) when is_boolean(V) -> V end,
+ true) of
+ false ->
+ xml:get_subtag(Packet, <<"body">>) /= false;
+ true ->
+ true
+ end;
+ true ->
+ false
+ end.
+
+store_packet(From, To, Packet) ->
+ case need_to_store(To#jid.lserver, Packet) of
+ true ->
case has_no_storage_hint(Packet) of
false ->
case check_event(From, To, Packet) of
end;
_ -> ok
end;
- true -> ok
+ false -> ok
end.
has_no_storage_hint(Packet) ->