Plan to avoid malformed commit
Sometimes, even if it should never happen, some commits got malformed. In this case we MUST got a solution to fix the solution. here is a 2 phase plan:
- Validate the commit we create (
ConversationRepository::Impl::validCommits
) before announcing to peers/doing network stuff. If the commit is invalid, try again or abort commit - Add a SIP message to inform peer that the conversation MAY be malformed (to fix conversation with old broken commits). In this case the receiver must try to valid the commits and if the commit is indeed invalid, reset to the parent.