Do not use container for long encrypted messages, prepare to multiple wire prefixes

Bastien Le Querrec requested to merge fix-message-type-mismatch into master

Long encrypted messages are embed in containers and sent in multiple splitted messages. Splitted messages aren't displayed and Silence stores them to wait for the full container. This way to send encrypted messages creates a risk to consider an unencrypted message as a contained one, resulting in lost of unencrypted messages in rare (but plausible) situations.

This PR changes the way to send encrypted messages. They aren't splitted in containers anymore. Non contained encrypted messages will be fully recognized and decrypted by previous Silence releases.

The first commit do not change the way to receive and decrypt messages yet. So it can still lost unencrypted messages. The second displays containers instead of discarding them, resulting in no more lost messages but garbage if recipient uses old version. We can:

  • Merge the PR as it and release a new tag. This will fix a lot of bugs but encrypted messages sent with Silence >= 0.15.8 will result in garbage for users with the new release (those messages won't be lost, anyway). - OR -
  • Merge the first commit only, release the new tag and wait for ~1 month until users update their version. Then, we will merge the second commit and push another update. This will result in less garbage as most of users should use the version with the way to send encrypted messages, but at the cost that we will wait for a month to fix issues.

Merge request reports