I have some trouble merging the new extended encoding messages into conversations. The premise is this:

  1. each message may have any number of parents
  2. because it’s Bitmessage, we could already have the child when the parent arrives
  3. to make it easier on implementing clients, I want to handle single messages as conversations, too

I’ve got this algorithm figured out, but I’m not sure it’s the best possible solution:

  1. read message
  2. if there is at least one parent get the first conversation ID, else create one
  3. add conversation ID to message
  4. for each additional parent:
    1. if it does have a conversation ID, replace all occurrences with above
    2. else, add the above
  5. for each message that have this as their parent
    1. get their conversation ID
    2. replace all occurrences with above conversation ID

Maybe I’ll only allow one parent and just link to additional parents, at least if they’re not already part of the same conversation.

Any ideas, suggestions or problems you see? I’ll gladly discuss it on the bitmessage chan or on irc.freenode.net, channel #jabit, or just send me a bitmessage.