mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
Properly handle infinity as max number of message in mam offline storage
This commit is contained in:
parent
aaf674160b
commit
c550d36581
@ -793,8 +793,9 @@ read_mam_messages(LUser, LServer, ReadMsgs) ->
|
||||
ExtraMsgs;
|
||||
_ ->
|
||||
MaxOfflineMsgs = case get_max_user_messages(LUser, LServer) of
|
||||
Number when is_integer(Number) -> Number;
|
||||
_ -> 100
|
||||
Number when is_integer(Number) -> Number - length(ExtraMsgs);
|
||||
infinity -> undefined;
|
||||
_ -> 100 - length(ExtraMsgs)
|
||||
end,
|
||||
JID = jid:make(LUser, LServer, <<>>),
|
||||
{MamMsgs, _, _} = mod_mam:select(LServer, JID, JID,
|
||||
|
Loading…
Reference in New Issue
Block a user