diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/Notifications/Messages/UserMergedMessage.cs b/dotnet-authserver/src/TeacherIdentity.AuthServer/Notifications/Messages/UserMergedMessage.cs index c09880a5c..5c5887aa9 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/Notifications/Messages/UserMergedMessage.cs +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/Notifications/Messages/UserMergedMessage.cs @@ -5,5 +5,5 @@ public record UserMergedMessage : INotificationMessage public const string MessageTypeName = "UserMerged"; public required Guid MergedUserId { get; init; } - public required User MasterUser { get; init; } + public required Guid MasterUserId { get; init; } } diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/Notifications/PublishNotificationsEventObserver.cs b/dotnet-authserver/src/TeacherIdentity.AuthServer/Notifications/PublishNotificationsEventObserver.cs index 8da08ba93..00a9d7e13 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/Notifications/PublishNotificationsEventObserver.cs +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/Notifications/PublishNotificationsEventObserver.cs @@ -74,8 +74,8 @@ private static IEnumerable GetNotificationsForEvent(EventB NotificationId = Guid.NewGuid(), Message = new UserMergedMessage() { - MasterUser = userMerged.User, - MergedUserId = userMerged.MergedWithUserId + MasterUserId = userMerged.MergedWithUserId, + MergedUserId = userMerged.User.UserId }, MessageType = UserMergedMessage.MessageTypeName, TimeUtc = userMerged.CreatedUtc diff --git a/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/WebHooks/WebHooksEndToEndTests.cs b/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/WebHooks/WebHooksEndToEndTests.cs index 53dbc1b08..cc768cf68 100644 --- a/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/WebHooks/WebHooksEndToEndTests.cs +++ b/dotnet-authserver/tests/TeacherIdentity.AuthServer.Tests/WebHooks/WebHooksEndToEndTests.cs @@ -381,7 +381,7 @@ public async Task UserMerged_WhenPublished_IsOnlySentToWebHookEndpointsWhichSubs NotificationId = Guid.NewGuid(), Message = new UserMergedMessage() { - MasterUser = user, + MasterUserId = user.UserId, MergedUserId = mergedUserId }, MessageType = UserMergedMessage.MessageTypeName,