XMPP: Composing events and <id/> tags

Mark Doliner mark at kingant.net
Tue Apr 24 02:56:04 EDT 2007


On Thu, 19 Apr 2007 10:44:51 -0400, Evan Schoenberg wrote
> XEP-0022 (message events) [1] says that the event MUST have an <id/> 
>  tag, and that if there's no id for the associated message it should 
>  be included but have no CDATA.
> 
> We don't do ids for typing events; this makes some clients (e.g.  
> Pandion) treat it as a composing event request and not display the  
> relevant information.
> 
> Would setting jm->id to "" when creating the JabberMessage in  
> jabber_send_typing() be an appropriate solution?

Nope!  jm->id specifies the id attribute on the message element, which we
already set.  This spec is talking about the id element that is a child of the
<x xmlns='jabber:x:event'> element.

We're definitely in violation of the spec here.  I don't think adding an empty
<id> tag would help much, we'd still be in violation of the spec.  Really I
think we should only be sending XEP-0022 <composing> messages if we're
replying to a message.  We should not send them on the initial message to
someone.  And the id tag should contain the value of the id attribute from the
message tag that you received from the other person.

But it's kinda minor.  It would be easier to just remove support for XEP-0022,
since it's superseded by XEP-0085 anyway.

-Mark

> [1] http://www.xmpp.org/extensions/xep-0022.html#sect-id2251213




More information about the Devel mailing list