mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 17:59:31 +02:00
Match namespace when checking for chat states
When checking for standalone chat states, match the namespace rather than the names of the elements defined in the current XEP-0085 revision.
This commit is contained in:
parent
beeb1c82d9
commit
b79f09d0eb
1 changed files with 2 additions and 4 deletions
|
@ -531,10 +531,8 @@ rsm_encode_count(Count, Arr) ->
|
||||||
-spec is_standalone_chat_state(xmlel()) -> boolean().
|
-spec is_standalone_chat_state(xmlel()) -> boolean().
|
||||||
|
|
||||||
is_standalone_chat_state(#xmlel{name = <<"message">>, children = Els}) ->
|
is_standalone_chat_state(#xmlel{name = <<"message">>, children = Els}) ->
|
||||||
ChatStates = [<<"active">>, <<"inactive">>, <<"gone">>, <<"composing">>,
|
Stripped = [El || #xmlel{name = Name, attrs = Attrs} = El <- Els,
|
||||||
<<"paused">>],
|
fxml:get_attr_s(<<"xmlns">>, Attrs) /= ?NS_CHATSTATES,
|
||||||
Stripped = [El || #xmlel{name = Name} = El <- Els,
|
|
||||||
not lists:member(Name, ChatStates),
|
|
||||||
Name /= <<"thread">>],
|
Name /= <<"thread">>],
|
||||||
Stripped == [];
|
Stripped == [];
|
||||||
is_standalone_chat_state(_El) -> false.
|
is_standalone_chat_state(_El) -> false.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue