mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Process on_user_offline only from valid sessions
This commit is contained in:
parent
35eeaa5869
commit
7a90cda8ff
@ -593,9 +593,10 @@ on_user_online(C2SState) ->
|
||||
C2SState.
|
||||
|
||||
-spec on_user_offline(ejabberd_c2s:state(), atom()) -> ejabberd_c2s:state().
|
||||
on_user_offline(C2SState, _Reason) ->
|
||||
JID = maps:get(jid, C2SState),
|
||||
on_user_offline(#{jid := JID} = C2SState, _Reason) ->
|
||||
purge_offline(jid:tolower(JID)),
|
||||
C2SState;
|
||||
on_user_offline(C2SState, _Reason) ->
|
||||
C2SState.
|
||||
|
||||
%% -------
|
||||
|
Loading…
Reference in New Issue
Block a user