Canceling join request now actually changes the status to cancelled so trying to join same RequestToJoin whiteboard with code manually doesnt fail due to status being Pending

This commit is contained in:
2026-03-09 23:06:27 +01:00
parent 10b550a59a
commit 8fa0de6094
11 changed files with 94 additions and 8 deletions

View File

@@ -2,6 +2,7 @@ using AipsCore.Application.Models.Shape.Command.CreateTextShape;
using AipsCore.Application.Models.Shape.Command.MoveShape;
using AipsCore.Application.Models.Whiteboard.Command.AcceptUserRequestToJoin;
using AipsCore.Application.Models.Whiteboard.Command.RejectUserRequestToJoin;
using AipsCore.Application.Models.Whiteboard.Command.UserCanceledRequestToJoin;
using AipsRT.Model.Whiteboard.Shapes;
namespace AipsRT.Services.Interfaces;
@@ -17,4 +18,5 @@ public interface IMessagingService
Task AcceptedUser(AcceptUserRequestToJoinCommand command);
Task RejectedUser(RejectUserRequestToJoinCommand command);
Task CancelJoinRequest(UserCanceledRequestToJoinCommand command);
}

View File

@@ -6,6 +6,7 @@ using AipsCore.Application.Common.Message.AddRectangle;
using AipsCore.Application.Common.Message.AddTextShape;
using AipsCore.Application.Common.Message.MoveShape;
using AipsCore.Application.Common.Message.RejectUserRequestToJoin;
using AipsCore.Application.Common.Message.UserCanceledRequestToJoin;
using AipsCore.Application.Models.Shape.Command.CreateArrow;
using AipsCore.Application.Models.Shape.Command.CreateLine;
using AipsCore.Application.Models.Shape.Command.CreateRectangle;
@@ -13,6 +14,7 @@ using AipsCore.Application.Models.Shape.Command.CreateTextShape;
using AipsCore.Application.Models.Shape.Command.MoveShape;
using AipsCore.Application.Models.Whiteboard.Command.AcceptUserRequestToJoin;
using AipsCore.Application.Models.Whiteboard.Command.RejectUserRequestToJoin;
using AipsCore.Application.Models.Whiteboard.Command.UserCanceledRequestToJoin;
using AipsRT.Model.Whiteboard.Shapes;
using AipsRT.Services.Interfaces;
@@ -116,4 +118,10 @@ public class MessagingService : IMessagingService
var message = new RejectUserRequestToJoinMessage(command);
await _messagePublisher.PublishAsync(message);
}
public async Task CancelJoinRequest(UserCanceledRequestToJoinCommand command)
{
var message = new UserCanceledRequestToJoinMessage(command);
await _messagePublisher.PublishAsync(message);
}
}