25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Ignore hints when checking for chat states

Ignore XEP-0334 elements when checking whether a stanza is a stand-alone
XEP-0085 chat state notification.  This allows for CSI-filtering chat
states with (e.g.) a no-store hint.

Thanks to Thilo Molitor for reporting the issue.
This commit is contained in:
Holger Weiss 2024-02-03 13:20:34 +01:00
parent 66d701e788
commit 01c70868ef

View File

@ -195,7 +195,7 @@ get_mucsub_event_type(_Packet) ->
is_standalone_chat_state(Stanza) -> is_standalone_chat_state(Stanza) ->
case unwrap_carbon(Stanza) of case unwrap_carbon(Stanza) of
#message{body = [], subject = [], sub_els = Els} -> #message{body = [], subject = [], sub_els = Els} ->
IgnoreNS = [?NS_CHATSTATES, ?NS_DELAY, ?NS_EVENT], IgnoreNS = [?NS_CHATSTATES, ?NS_DELAY, ?NS_EVENT, ?NS_HINTS],
Stripped = [El || El <- Els, Stripped = [El || El <- Els,
not lists:member(xmpp:get_ns(El), IgnoreNS)], not lists:member(xmpp:get_ns(El), IgnoreNS)],
Stripped == []; Stripped == [];