25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

If mod_last is disabled, return error instead of crashing (#2330)

This commit is contained in:
Badlop 2018-03-20 22:18:43 +01:00
parent 8962397cf3
commit b4b3ff50d6

View File

@ -188,7 +188,9 @@ get_last(LUser, LServer) ->
?LAST_CACHE, {LUser, LServer},
fun() -> Mod:get_last(LUser, LServer) end);
false ->
Mod:get_last(LUser, LServer)
Mod:get_last(LUser, LServer);
undefined ->
error
end,
case Res of
{ok, {TimeStamp, Status}} -> {ok, TimeStamp, Status};