mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-18 22:15:20 +02:00
Ignore <delay/> when checking for chat states
Ignore XEP-0203 elements when checking whether a message stanza is a standalone chat state.
This commit is contained in:
parent
5c1db176a9
commit
3a1fc6fb66
|
@ -532,8 +532,10 @@ rsm_encode_count(Count, Arr) ->
|
|||
-spec is_standalone_chat_state(xmlel()) -> boolean().
|
||||
|
||||
is_standalone_chat_state(#xmlel{name = <<"message">>, children = Els}) ->
|
||||
IgnoreNS = [?NS_CHATSTATES, ?NS_DELAY],
|
||||
Stripped = [El || #xmlel{name = Name, attrs = Attrs} = El <- Els,
|
||||
fxml:get_attr_s(<<"xmlns">>, Attrs) /= ?NS_CHATSTATES,
|
||||
not lists:member(fxml:get_attr_s(<<"xmlns">>, Attrs),
|
||||
IgnoreNS),
|
||||
Name /= <<"thread">>],
|
||||
Stripped == [];
|
||||
is_standalone_chat_state(_El) -> false.
|
||||
|
|
Loading…
Reference in New Issue
Block a user