Summary: | jabber: typing notification sent twice | ||
---|---|---|---|
Product: | [Unmaintained] kopete | Reporter: | Johannes Wienke <languitar> |
Component: | Jabber Plugin | Assignee: | Kopete Developers <kopete-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kontakt |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Johannes Wienke
2006-12-30 23:53:43 UTC
Sorry, I cannot really reproduce. There is exactly one typing notification sent that indicates that I started typing and exactly one typing notification that I stopped typing. Here is "my" full debug output. kopete (jabber): [void JabberChatSession::slotSendTypingNotification(bool)] Sending out typing notification (true) to all chat members. kopete (jabber - raw protocol): [void JabberAccount::slotClientDebugMessage(const QString&)] XML OUT: <message from="xxx@jabber.example.com/Kopete" type="chat" id="ab1fa" to="yyy@jabber.example.com/Miranda" > <composing xmlns="http://jabber.org/protocol/chatstates"/> <x xmlns="jabber:x:event"> <id>mir_8</id> <composing/> </x> </message> kopete (jabber - raw protocol): kopete (jabber): [void JabberChatSession::slotSendTypingNotification(bool)] Sending out typing notification (false) to all chat members. kopete (jabber - raw protocol): [void JabberAccount::slotClientDebugMessage(const QString&)] XML OUT: <message from="xxx@jabber.example.com/Kopete" type="chat" id="ab20a" to="yyy@jabber.example.com/Miranda" > <paused xmlns="http://jabber.org/protocol/chatstates"/> <x xmlns="jabber:x:event"> <id>mir_8</id> </x> </message> kopete (jabber - raw protocol): kopete (jabber - raw protocol): [void JabberAccount::slotClientDebugMessage(const QString&)] XML OUT: <message from="xxx@jabber.example.com/Kopete" type="chat" id="ab21a" to="yyy@jabber.example.com/Miranda" > <body>test</body> <active xmlns="http://jabber.org/protocol/chatstates"/> <x xmlns="jabber:x:event"> <offline/> <composing/> <delivered/> <displayed/> </x> </message> Strange, how do I get such a protocol? The friend, how noticed this bug while I was chatting with her, said that other kopete-users also invoke two notifications with that plugin. So there must be something kopete does other what other clients don't do. OK, I found it. After I compiled it with debug-flag (Gentoo) I got this output while typing a sentence: -------------------- kopete (jabber): [void JabberChatSession::slotSendTypingNotification(bool)] Sending out typing notification (true) to all chat members. kopete (jabber - raw protocol): [void JabberAccount::slotClientDebugMessage(const QString&)] XML OUT: <message from="languitar@jabber.org/Kopete/Laptop" type="chat" id="ab09a" to="foobar_at_jabber.org/home" > <composing xmlns="http://jabber.org/protocol/chatstates"/> <x xmlns="jabber:x:event"> <id>mir_8</id> <composing/> </x> </message> kopete (jabber - raw protocol): kopete (jabber): [void JabberChatSession::slotSendTypingNotification(bool)] Sending out typing notification (true) to all chat members. kopete (jabber - raw protocol): [void JabberAccount::slotClientDebugMessage(const QString&)] XML OUT: <message from="languitar@jabber.org/Kopete/Laptop" type="chat" id="ab0aa" to="foobar_at_jabber.org/home" > <composing xmlns="http://jabber.org/protocol/chatstates"/> <x xmlns="jabber:x:event"> <id>mir_8</id> <composing/> </x> </message> kopete (jabber - raw protocol): kopete (jabber): [void JabberChatSession::slotSendTypingNotification(bool)] Sending out typing notification (true) to all chat members. kopete (jabber - raw protocol): [void JabberAccount::slotClientDebugMessage(const QString&)] XML OUT: <message from="languitar@jabber.org/Kopete/Laptop" type="chat" id="ab0ba" to="foobar_at_jabber.org/home" > <composing xmlns="http://jabber.org/protocol/chatstates"/> <x xmlns="jabber:x:event"> <id>mir_8</id> <composing/> </x> </message> kopete (jabber - raw protocol): kopete (jabber): [void JabberChatSession::slotSendTypingNotification(bool)] Sending out typing notification (false) to all chat members. kopete (jabber - raw protocol): [void JabberAccount::slotClientDebugMessage(const QString&)] XML OUT: <message from="languitar@jabber.org/Kopete/Laptop" type="chat" id="ab0ca" to="foobar_at_jabber.org/home" > <paused xmlns="http://jabber.org/protocol/chatstates"/> <x xmlns="jabber:x:event"> <id>mir_8</id> </x> </message> -------------------- The last notification is the paused-message, which was invoked when I took some time to open the terminal and so on. I've tried to understand when which message is sent. What I noticed, is that the first one is sent correctly when I begin typing. The ones in between are hard to understand (I think the number is relation with the time I am typing) and the last typing-message is sent directly before the message that I stopped typing. Many thanks for your debug output. You were completely right. Kopete is indeed sending out too many jabber composing events when you are typing for a sufficiently long time. "Too many" because section "5.3 Repetition" of XEP-0085 states that "Even if the user types continuously for a long time (e.g., while composing a lengthy reply), the client MUST NOT send more than one standalone <composing/> notification in a row." I've made a patch that, among other things, has the drawback of changing the public API of JabberChatSession in order to store the last sent chat state event. :-/ For this reason, I did not commited it ... At least, I'll try to fix the other things first. *** Bug 156746 has been marked as a duplicate of this bug. *** SVN commit 919429 by ttrnka: Do not send repeated typing notifications. BUG: 139418 M +38 -32 jabberchatsession.cpp M +6 -4 jabberchatsession.h WebSVN link: http://websvn.kde.org/?view=rev&revision=919429 |