I’m not expert in this particular field. I would recommend asking generic XMPP questions on the jdev mailing list: XMPP | Community
But here are my thoughts.
The other 4 would pick that up and overwrite the old one.
Is that how it should work?
If the fifth posts a new message without knowing the previous one, then he likely must have created a new thread, as his new message is unrelated to the existing thread/discussion of the other four. But this does not imply that the other 4 should pick up the thread id and forget the old one as their old discussion could still continue.
When to generate a new message thread?
I’d say, as a thread id is “a unique identifier for a conversation thread”, every time a new conversation begins. You you decide that this has happened is up to the implementor.
Uh… having each occupant keep a reference to multiple threads is a real pain…
E.g. let’s say the new occupant creates a new thread (because he’s new) and occupant A replies to this thread, but also keeps replying to the old thread…
That’s probably too much… Logic can’t decide to which thread one is replying, so the UI should ask the occupant to which thread he’s replying, but I think it’s too uncomfortable for the user.
Thanks for your answer, I will find a way.
I guess I will generate a new thread id, if none is set and all occupants will then simply overwrite it.