25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Allow storing non-composing x:events in offline

This commit is contained in:
Paweł Chmielowski 2021-08-04 15:30:29 +02:00
parent 99ffd9bb95
commit d7e330c8ef

View File

@ -572,6 +572,16 @@ check_event(#message{from = From, to = To, id = ID, type = Type} = Msg) ->
sub_els = [#xevent{id = ID, offline = true}]}, sub_els = [#xevent{id = ID, offline = true}]},
ejabberd_router:route(NewMsg), ejabberd_router:route(NewMsg),
true; true;
% Don't store composing events
#xevent{id = V, composing = true} when V /= undefined ->
false;
% Nor composing stopped events
#xevent{id = V, composing = false, delivered = false,
displayed = false, offline = false} when V /= undefined ->
false;
% But store other received notifications
#xevent{id = V} when V /= undefined ->
true;
_ -> _ ->
false false
end. end.