On Sun, 2002-07-14 at 10:01, Sean Wheeler wrote:
>
> So I'm pretty new to jabber protocol, but one thing has already come up.
> Apologies in advance if this is obvious or has been discussed at length.
>
> Assume my client "bar@media" sends a message to a counterpart:
>
> SENT: <message id="1" to="foo@media">...</message>
>
> Foo receives
> RECV: <message id="1" to="foo@media" from="bar@media">...</message>
>
> and replies
> SENT: <message id="1" to="bar@media">...</message>
>
> Preserving the id attribute lets my client "foo" reconstruct that this was
> a reply to outgoing message 1. However, if "foo" replies to bar, how can
> "bar" reconstruct the reply to its previous outgoing message, since id
> attributes are preserved?
The best way to match a "thread" of messages is to use the "thread"
element. Your example (from bar@media's perspective) is then converted
to:
SEND (bar@media):
<message id='msg1' to='foo@media'>
<thread>123456789</thread>
<body>What's up?</body>
</message>
RECV (foo@media):
<message id='msg1' to='bar@media'>
<thread>123456789</thread>
<body>Nothin'. You?</body>
</message>
SEND (bar@media):
<message id='msg2' to='foo@media'>
<thread>123456789</thread>
<body>Watchin' the game</body>
</message>
>
> My workaround in my client is to use both id attributes and id tags in the
> message. A reply promotes the incoming id tag to an attribute, and adds a
> new tag of its own. It's kind of confusing at first, but the scheme is
> like--
>
Using a tag like this is technically outside of spec, which means that
other clients and components may (at best) ignore this <id/> element, or
(at worst) fail.
For more info on this spec, check out the current IETF RFC drafts:
http://www.jabber.org/ietf/draft-miller-xmpp-core-00.html
>
> Sean
>
>
> _______________________________________________
> jdev mailing list
> [EMAIL PROTECTED]
> http://mailman.jabber.org/listinfo/jdev
--
Matt "Linuxwolf" Miller
e-mail && jid: [EMAIL PROTECTED]
- Have you "JABBERed" recently? (http://www.jabbercentral.org/)
_______________________________________________
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev