[Council] Message threads

Ian Paterson ian.paterson at clientside.co.uk
Sun Jan 28 11:44:57 CST 2007


Hi,

I made a few changes to the CVS copy of XEP-0201 ( 
http://www.jabberstudio.org/cgi-bin/viewcvs.cgi/cvs/xmpp/extensions/xep-0201.xml?r1=1.5&r2=1.6 
).

Going forward, the concept of a (chat) session is going to be 
fundamental to most clients. So I think we can specify that all messages 
of type 'chat' SHOULD include a thread element.

Clients that aren't going to implement formal sessions can easily 
facilitate those that will, but we can't force legacy clients to include 
thread IDs so I also added:

If a client receives a message of type 'chat' without a thread ID then:
1. If the receiving client has no sessions open with the message sender 
(full JID), or if all the open sessions have already _received_ a 
message that included the session's thread ID, then the receiver should 
create a new session with a new thread ID (and include that thread ID in 
all the messages it sends within the session).
2. If the receiver has a session open with the sender for which it has 
not received a message including the session's thread ID, then it should 
consider the message to be part of that session. If more than one such 
sessions exist, then the message should be considered part of the 
session in which the receiver last sent a message.

Another new paragraph:
If an entity receives an XMPP presence stanza of type 'unavailable' from 
the other entity during a chat session, it SHOULD NOT destroy the 
thread, it SHOULD assume the other entity will still be able to continue 
the session (perhaps the other entity simply became "invisible", or was 
temporarily disconnected by a network error, or it is persisting the 
state of the session until it reconnects and receives "offline" messages).

Finally, session termination stanzas (as defined in XEP-0155) may be 
used to terminate a session even if the session was not negotiated with 
XEP-0155:

<message type='normal' from='juliet at capulet.com/balcony' 
to='romeo at montague.net/orchard'>
<thread>ffd7076498744578d10edabfe7f4a866</thread>
<feature xmlns='http://jabber.org/protocol/feature-neg'>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE'>
<value>urn:xmpp:chatneg</value>
</field>
<field var='terminate'>
<value>1</value>
</field>
</x>
</feature>
</message>

Let me know if there are objections etc.

Peter, there may be a few more suggestions over the coming week, so we 
could hold off publishing for now.

- Ian



More information about the Council mailing list