aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mod_offline.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mod_offline.erl b/src/mod_offline.erl
index 695cc6a94..9e8af2c16 100644
--- a/src/mod_offline.erl
+++ b/src/mod_offline.erl
@@ -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 ->