Initial integration.

This commit is contained in:
Burak Kaan Köse
2025-12-26 20:46:48 +01:00
parent 10b85ea135
commit 014b5aa671
79 changed files with 4694 additions and 432 deletions
@@ -69,6 +69,11 @@ public class OutlookChangeProcessor(IDatabaseService databaseService,
savingItem.EndDateOffset = eventEndDateTimeOffset.Offset;
savingItem.DurationInSeconds = durationInSeconds;
// Store the timezone information from the event
// This preserves the original timezone from Outlook, allowing proper reconstruction later
savingItem.StartTimeZone = calendarEvent.Start?.TimeZone;
savingItem.EndTimeZone = calendarEvent.End?.TimeZone;
savingItem.Title = calendarEvent.Subject;
savingItem.Description = calendarEvent.Body?.Content;
savingItem.Location = calendarEvent.Location?.DisplayName;
@@ -103,6 +108,34 @@ public class OutlookChangeProcessor(IDatabaseService databaseService,
savingItem.OrganizerDisplayName = calendarEvent.Organizer?.EmailAddress?.Name;
savingItem.IsHidden = false;
// Set timestamps
if (calendarEvent.CreatedDateTime.HasValue)
savingItem.CreatedAt = calendarEvent.CreatedDateTime.Value;
if (calendarEvent.LastModifiedDateTime.HasValue)
savingItem.UpdatedAt = calendarEvent.LastModifiedDateTime.Value;
// Set visibility
if (calendarEvent.Sensitivity != null)
{
savingItem.Visibility = calendarEvent.Sensitivity.Value switch
{
Sensitivity.Normal => CalendarItemVisibility.Public,
Sensitivity.Personal => CalendarItemVisibility.Private,
Sensitivity.Private => CalendarItemVisibility.Private,
Sensitivity.Confidential => CalendarItemVisibility.Confidential,
_ => CalendarItemVisibility.Public
};
}
else
{
savingItem.Visibility = CalendarItemVisibility.Public;
}
// Set IsLocked based on whether the user is the organizer
// Read-only events are those where the current user is not the organizer
savingItem.IsLocked = calendarEvent.IsOrganizer.HasValue && !calendarEvent.IsOrganizer.Value;
if (calendarEvent.ResponseStatus?.Response != null)
{
switch (calendarEvent.ResponseStatus.Response.Value)