Don't fail to classify stand-alone chat states
Ignore XEP-0359 elements when checking whether a stanza has non-XEP-0085 content. This allows mod_client_state to filter chat states with an <origin-id/> element.
This commit is contained in:
+5
-1
@@ -195,7 +195,11 @@ 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, ?NS_HINTS],
|
||||
IgnoreNS = [?NS_CHATSTATES,
|
||||
?NS_DELAY,
|
||||
?NS_EVENT,
|
||||
?NS_HINTS,
|
||||
?NS_SID_0],
|
||||
Stripped = [El || El <- Els,
|
||||
not lists:member(xmpp:get_ns(El), IgnoreNS)],
|
||||
Stripped == [];
|
||||
|
||||
Reference in New Issue
Block a user