mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Allow storing non-composing x:events in offline
This commit is contained in:
parent
99ffd9bb95
commit
d7e330c8ef
@ -572,6 +572,16 @@ check_event(#message{from = From, to = To, id = ID, type = Type} = Msg) ->
|
||||
sub_els = [#xevent{id = ID, offline = true}]},
|
||||
ejabberd_router:route(NewMsg),
|
||||
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
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user