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
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ get_mucsub_event_type(_Packet) ->
is_standalone_chat_state(Stanza) ->
case unwrap_carbon(Stanza) of
#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,
not lists:member(xmpp:get_ns(El), IgnoreNS)],
Stripped == [];