feat(platform): route scheduler notifications through platform messenger
PR Checks / test-and-build (pull_request) Successful in 7m9s

This commit is contained in:
2026-05-21 12:30:35 +03:00
parent 5dbec1a0a4
commit 2a707e4825
49 changed files with 2158 additions and 846 deletions
@@ -51,4 +51,42 @@ public sealed class PlatformContractsTests
Assert.Equal(PlatformKind.Discord, message.Group.Platform);
Assert.Same(view, message.View);
}
[Fact]
public void PlatformNotificationContracts_ShouldBeSdkAssemblyFree()
{
var contractTypes = new[]
{
typeof(PlatformSessionParticipant),
typeof(PlatformConfirmationRequest),
typeof(PlatformJoinLinkNotification),
typeof(PlatformDirectSessionNotification),
typeof(PlatformRsvpMessageUpdate),
typeof(PlatformRsvpOutcomeNotification),
typeof(PlatformRescheduleVoteUpdate)
};
Assert.All(contractTypes, type =>
{
var refs = string.Join(" ", type.Assembly.GetReferencedAssemblies().Select(value => value.Name));
Assert.DoesNotContain("Telegram", refs, StringComparison.OrdinalIgnoreCase);
Assert.DoesNotContain("NetCord", refs, StringComparison.OrdinalIgnoreCase);
});
}
[Fact]
public void PlatformMessenger_ShouldExposeSchedulerNotificationOperations()
{
var methods = typeof(IPlatformMessenger)
.GetMethods()
.Select(method => method.Name)
.ToHashSet(StringComparer.Ordinal);
Assert.Contains("SendConfirmationRequestAsync", methods);
Assert.Contains("UpdateConfirmationRequestAsync", methods);
Assert.Contains("SendJoinLinkNotificationAsync", methods);
Assert.Contains("SendDirectSessionNotificationAsync", methods);
Assert.Contains("SendRsvpOutcomeAsync", methods);
Assert.Contains("UpdateRescheduleVoteAsync", methods);
}
}