From 01c70868efdc1890ee99cba473b4c37bc4939c10 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Sat, 3 Feb 2024 13:20:34 +0100 Subject: [PATCH] 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. --- src/misc.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc.erl b/src/misc.erl index 3dd805665..6d3491a90 100644 --- a/src/misc.erl +++ b/src/misc.erl @@ -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 == [];