[jdev] Re: Proper use of <composing/>
Magnus Henoch
mange at freemail.hu
Mon Aug 29 01:46:46 CDT 2005
Mark Derricutt <mark at talios.com> writes:
> Hey all, just getting back into some XMPP dev and was wondering about
> the <composing/> element inside a message.
>
> I added some code to ignoring messages there were being "composed" on
> the assumption that it's not the final message, and that I'd be
> expecting a copy without a <composing/> element once the user has sent
> the final message.
>
> However, the more I look at this, the more I see clients sending only
> one final message with the entire message content AND the <composing/>
> element.
>
> <message to="talios at gmail.com/mobile"
> from="dantekgeek at gmail.com/AdiumEC5BBF13" type="chat"><body>and now I
> see you on IRC</body><x xmlns="jabber:x:event"><composing/></x><html
> xmlns="http://jabber.org/protocol/xhtml-im"></html></message>
>
>
> Does anyone have a pointer for a JEP for this composition message? I
> can't seem to spot which its in. I'm sure my assumptions are wrong
> (which is more logical than the alternative that everyone else has it
> wrong)....
The JEP is JEP-0022. You can read all the details there, but
basically there are two kinds of <x/> tags - those that request event
notifications, and those that raise them. If the <x/> tag has an
<id/> tag, it raises an event; if not, it requests events. Thus, the
XML excerpt above only means that the remote client asks you to send
<composing/> events.
Magnus
--
JID: legoscia at jabber.cd.chalmers.se
More information about the JDev
mailing list