Calendar invitations for Mail part of the app.

This commit is contained in:
Burak Kaan Köse
2026-01-05 00:21:07 +01:00
parent 0b0f6b8d8e
commit 3d07328f47
24 changed files with 679 additions and 66 deletions
@@ -135,6 +135,24 @@ public class OutlookChangeProcessor(IDatabaseService databaseService,
savingItem.Visibility = CalendarItemVisibility.Public;
}
// Set ShowAs status
if (calendarEvent.ShowAs != null)
{
savingItem.ShowAs = calendarEvent.ShowAs.Value switch
{
Microsoft.Graph.Models.FreeBusyStatus.Free => CalendarItemShowAs.Free,
Microsoft.Graph.Models.FreeBusyStatus.Tentative => CalendarItemShowAs.Tentative,
Microsoft.Graph.Models.FreeBusyStatus.Busy => CalendarItemShowAs.Busy,
Microsoft.Graph.Models.FreeBusyStatus.Oof => CalendarItemShowAs.OutOfOffice,
Microsoft.Graph.Models.FreeBusyStatus.WorkingElsewhere => CalendarItemShowAs.WorkingElsewhere,
_ => CalendarItemShowAs.Busy
};
}
else
{
savingItem.ShowAs = CalendarItemShowAs.Busy;
}
// 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;