powered by Jive Software

Groupchat Messages: Using Message Threads

This question might not be directly Smack related, but more XMPP-related.

How do you manage message threads in a groupchat?

I’ve read XEP-0201: Best Practices for Message Threads but it doesn’t help much.

E.g. let’s say you have a room with 4 occupants.

The first one writes a message and sets a random thread id.

All other three could pick that thread id up and use it in consequent messages.

Now a fifth one enters the room and immediately writes a message. He obviously can’t know the current thread id and therefore creates a new one.

The other 4 would pick that up and overwrite the old one.

Is that how it should work?

When to generate a new message thread?

Is it maybe bound to subject changes?

Should new occupants send any message thread at all?

Should I have a button on the UI ala “New thread” and let the user decide when to generate a new thread?

Thanks for some opinion!

I’m not expert in this particular field. I would recommend asking generic XMPP questions on the jdev mailing list: http://xmpp.org/participate/discuss-xmpp/

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.