When one save changes several occurrences, each change is sent to the
attendees in turn. If a later change was refused, for example because a
resource was already booked, the earlier changes had already reached the
attendees while the organizer's calendar was left unchanged.
Run the booking and availability checks for all changes first, and send
nothing if one of them fails. A save with a single change skips this step,
because the normal check already covers it.
When an organizer saves a recurring event from a CalDAV client and the save
changes several occurrences, SOGo sends only one of those changes to the
attendees. The other changes are stored in the organizer's calendar, but
the attendees never receive them and no error is reported. Which change is
sent depends on the order of the occurrences in the request.
Send every change instead: first the removed occurrences, then the added or
changed occurrences, and last the main event if it changed. The main event
goes last because attendees then receive the whole series, which must
already include the updated occurrences.
The checks on the organizer and on delegated senders are unchanged.
Reported to Alinto support as ticket 6099.
setFromIdentity located the previous signature by embedding its HTML
in a regular expression. Metacharacters, plain text and CKEditor's
<br> serialization made the search miss, and the regex-too-large
fallback appended the new signature.
The delimiter is now matched with a fixed-size pattern. The signature
body is compared as text, from the end of the break that follows the
dash. A missed match is null. One missing blank line before the
delimiter is still recognized.
Fixes#6168Fixes#6214Fixes#5695