Archive completed meeting assistant changes
PR and Push Build/Test / build-and-test (push) Successful in 9m19s

This commit is contained in:
2026-06-26 13:15:47 +02:00
parent 7d16b0cad7
commit aecef30627
72 changed files with 2914 additions and 406 deletions
@@ -108,6 +108,37 @@ internal static class OutlookClassicCom
}
}
public static bool IsCanceledAppointment(object appointment)
{
var meetingStatus = TryGetProperty(appointment, "MeetingStatus");
if (meetingStatus is not null)
{
try
{
var status = Convert.ToInt32(meetingStatus);
if (status is 5 or 7)
{
return true;
}
}
catch (Exception exception) when (exception is FormatException or InvalidCastException or OverflowException)
{
// Fall back to subject prefixes when Outlook exposes a non-numeric status value.
}
}
var subject = Convert.ToString(TryGetProperty(appointment, "Subject")) ?? "";
return SubjectIndicatesCancellation(subject);
}
internal static bool SubjectIndicatesCancellation(string subject)
{
var normalized = subject.TrimStart();
return normalized.StartsWith("Canceled:", StringComparison.OrdinalIgnoreCase) ||
normalized.StartsWith("Cancelled:", StringComparison.OrdinalIgnoreCase) ||
normalized.StartsWith("Abgesagt:", StringComparison.OrdinalIgnoreCase);
}
public static DateTimeOffset ToLocalOffset(DateTime value)
{
return new DateTimeOffset(DateTime.SpecifyKind(value, DateTimeKind.Local));