Someone correct me if I'm wrong: The ID attribute should be preserved for sending and receipt of the first message, but it need not (and probabbly should not) be preserved in the reply. (Keeping the id in the reply as a default behavior would likely lead to keeping the same id in the reply to the reply, which would man bar@media would be sending multiple messages with the same id)
Eg:
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="2" to="bar@media">...</message>
The id attribute is intended to be used so that the sender and receiver
can refer to particular messages. For example, someone might implement a
"addendum" message type/namespace that changes some element of the
previous message:
<message id="3" type="addendum" from="bar@media" to="foo@media">
<x xmlns="jabber:x:addendum">
<append id="1">
See also http://somepage.com/ for more details.
</append>
</x>
</message>
That way, the <append> tag's "id" attribute can be uniquesly associated
with a particular mesage bar@media has already sent to foo@media.
As far as identifying replies & topics, I believe what you're looking
for is the standard message's <thread> tag.
On Sun, 2002-07-14 at 11: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?
>
> 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--
>
> bar
> SENT: <message to="foo@media"><id>1</id>...</message>
>
> foo receives
> RECV: <message to="foo@media" from="bar@media"><id>1</id>...</message>
>
> and replies
> SENT: <message id="1" to="bar@media"><id>2</id>...</message>
>
> so bar might reply
> <message id="2" to="foo@media"><id>3</id>...</message>
>
> Has anyone dealt with this problem in a more straightforward way?
>
> Sean
--
Jeremy Nickurak -= Email/Jabber: [EMAIL PROTECTED] =-
Mary had a crypto key, she kept it in escrow,
and everything that Mary said, the Feds were sure to know.
msg06468/pgp00000.pgp
Description: PGP signature
