mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Guard against pres_last=undefined in mod_offline
This commit is contained in:
parent
f465742f2c
commit
274e9fe7b5
@ -482,8 +482,8 @@ c2s_self_presence({_Pres, #{resend_offline := false}} = Acc) ->
|
||||
Acc;
|
||||
c2s_self_presence({#presence{type = available} = NewPres, State} = Acc) ->
|
||||
NewPrio = get_priority_from_presence(NewPres),
|
||||
LastPrio = case maps:get(pres_last, State, error) of
|
||||
error -> -1;
|
||||
LastPrio = case maps:get(pres_last, State, undefined) of
|
||||
undefined -> -1;
|
||||
LastPres -> get_priority_from_presence(LastPres)
|
||||
end,
|
||||
if LastPrio < 0 andalso NewPrio >= 0 ->
|
||||
|
Loading…
Reference in New Issue
Block a user