Set all participant states to NotDelivered only if a chat message goes into the NotDelivered state and the sender is in NotDelivered state.
Table conference_info_participants has a constraint such as the triple (participant_sip_address_id, conference_info_id, is_organizer) must be unique. In some rare case, it happens that there are two row with the same ivalue for column participant_sip_address_id and conference_info_id but a different one for is_organizer. To recover from this scenario, delete one of the two row such that the client will have the right informations once he/she joins the conference