5.2.23
12/09/2023

[#247] ChatStateFilter vs MessageEventFilter stops to recieve notification after sending message
Summary ChatStateFilter vs MessageEventFilter stops to recieve notification after sending message
Queue gloox
Queue Version 1.0.13
Type Bug
State Unconfirmed
Priority 2. Medium
Owners js (at) camaya (dot) net
Requester shmakov.ivan (at) gmail (dot) com
Created 03/13/2015 (3193 days ago)
Due
Updated 06/25/2015 (3089 days ago)
Assigned
Resolved

History
06/25/2015 04:48:35 PM Jakob Schröter Comment #2
Assigned to Jakob Schröter
Reply to this comment
03/13/2015 10:40:18 AM shmakov (dot) ivan (at) gmail (dot) com Comment #1
State ⇒ Unconfirmed
Queue ⇒ gloox
Summary ⇒ ChatStateFilter vs MessageEventFilter stops to recieve notification after sending message
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
C->QIP
<message xmlns='jabber:client' to='222(app.shmakov)@voximplant.com' 
id='uid-bd491290-00000006' type='chat' 
from='111(app.shmakov)@voximplant.com/VoxImplant'><body>Test 
Message</body><thread>glooxuid-bd491290-00000005</thread><active 
xmlns='http://jabber.org/protocol/chatstates'/><x xmlns='jabber
:x:event'><offline/><delivered/><displayed/><composing/></x></message>

C<-QIP:
10:34:58.251 INFO XMPP  <message 
to='111(app.shmakov)@voximplant.com/VoxImplant
from='222(app.shmakov)@voximplant.com/QIP'><x 
xmlns='jabber:x:event'><delivered/>
<id>uid-bd491290-00000006</id></x></message>

This message does not contains tag: <*** 
xmlns='http://jabber.org/protocol/chatstates'/> and ChatStateFilter stop

m_enableChatStates = state && state->state() != ChatStateInvalid;

because state is NULL and set m_enableChatStates=false

The next message does not process because m_enableChatStates=false
C<-QIP:
<message to='111(app.shmakov)@voximplant.com/VoxImplant' type='chat' 
id='qip_298' from='222(app.shmakov)@voximplant.com/QIP'><composing 
xmlns='http://jabber.org/protocol/chatstates'/></message>


I temporary pached ChatStateFilter.cpp so and all work.

40c40,43
<       m_enableChatStates = state && state->state() != ChatStateInvalid;
---
       if (!state)
           return;

       m_enableChatStates = (state->state() != ChatStateInvalid);
I think this flash should not be used in this filter.