[standards-jig] JEP-0022 composing Events

Sebastiaan 'CBAS' Deckers cbas at screaming3d.com
Sat Feb 1 17:41:05 UTC 2003


Alexander Gnauck wrote:
> Hello,
> 
> According to the JEP composing events are only allowed when i reply to a
> special message ID. But i want to send cpmosing events with every message i
> type. When i type one message after the other without receiving new
> messages, then i want to send composing / typing events to my chatpartner.
> But thats not allowed according to this JEP. Because of this i suggest a new
> events called 'typing'.
> 
> Examples:
> 
> sending a typing event
> <message from='gnauck at myjabber.net/home' to='srlee at myjabber.net/work'
> id='MX_10'>
> 	<x xmlns='jabber:x:event'>
>           <typing/>
>           <id>MX_11</id>
>       </x>
> </message>
> 
> cancel a typing event
> <message from='gnauck at myjabber.net/home' to='srlee at myjabber.net/work'
> id='MX_10'>
> 	<x xmlns='jabber:x:event'>
>       	<id>MX_11</id>
>       </x>
> </message>

I'm not sure where you get this MX_11 from, but the two <message/> tags 
should NOT have the same id (MX_10).
Here is how most clients handle composing events:

SENT:
<message from="cpod at black9.net/TipicIM" to="cbas at rhymbox.com/RhymBox" 
id="rbx1">
   <body>Hello.  Are you there?</body>
   <x xmlns="jabber:x:event">
     <composing/>
   </x>
</message>


RECV:
<message from="cbas at rhymbox.com/RhymBox" to="cpod at black9.net/TipicIM">
   <x xmlns="jabber:x:event">
     <composing/>
     <id>rbx1</id>
   </x>
</message>
Now we know that cbas is typing.  Notice that there is no id attribute 
for the <message/> element.


RECV:
<message from="cbas at rhymbox.com/RhymBox" to="cpod at black9.net/RhymBox">
   <x xmlns="jabber:x:event">
     <id>rbx1</id>
   </x>
</message>
Here cbas tells cpod he has stopped typing.  Again there is no id 
attribute for this <message/> element.  However the <id>rbx1</id> 
remains the same as the original message and the previous raising of the 
event.


RECV:
<message from="cbas at rhymbox.com/RhymBox" to="cpod at black9.net/RhymBox">
   <x xmlns="jabber:x:event">
     <composing/>
     <id>rbx1</id>
   </x>
</message>
Again the composing event is raised in the same way as before.  Same 
<id>rbx1</id>, and no id attribute in the <element/>.


RECV:
<message from="cbas at rhymbox.com/RhymBox" to="cpod at black9.net/RhymBox">
   <x xmlns="jabber:x:event">
     <id>rbx1</id>
   </x>
</message>
This is the second time cbas stops typing.  Identical to the first 
cancellation of the composing event.


RECV:
<message from="cbas at rhymbox.com/RhymBox" to="cpod at black9.net/RhymBox">
   <x xmlns="jabber:x:event">
     <composing/>
     <id>rbx1</id>
   </x>
</message>
The third time cbas starts typing.  As you see this is very repetitive.


RECV:
<message from="cbas at rhymbox.com/RhymBox" to="cpod at black9.net/TipicIM" 
id="rbx2">
   <body>Yes, I am here.</body>
</message>
I may be wrong, but I think it is implied that the composing event is 
dropped when a message is received.  That's the way most clients work 
and it hasn't caused any problems to my knowledge.


My conclusion is that the <composing/> event is sufficient and the 
proposed <typing/> event is not necessary.  Or maybe I'm missing the 
point completely.  ;-)

--
Sebastiaan




More information about the Standards mailing list