Skip to content

Commit

Permalink
Merge pull request #67 from hmcts/feature/VIH-4922
Browse files Browse the repository at this point in the history
Transfer fix for Consultation to In hearing
  • Loading branch information
RocheL authored Aug 22, 2019
2 parents 969866a + e59f5bf commit 4102fb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions VideoAPI/VideoApi.Events/Handlers/TransferEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ private static ParticipantState DeriveParticipantStatusForTransferEvent(Callback
callbackEvent.TransferTo == RoomType.WaitingRoom)
return ParticipantState.Available;

if ((callbackEvent.TransferFrom == RoomType.ConsultationRoom1 ||
callbackEvent.TransferFrom == RoomType.ConsultationRoom2) &&
callbackEvent.TransferTo == RoomType.HearingRoom)
return ParticipantState.InHearing;

switch (callbackEvent.TransferFrom)
{
case RoomType.WaitingRoom when callbackEvent.TransferTo == RoomType.HearingRoom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public class TransferEventHandlerTests : EventHandlerTestBase
[TestCase(RoomType.WaitingRoom, RoomType.ConsultationRoom2, ParticipantState.InConsultation)]
[TestCase(RoomType.ConsultationRoom1, RoomType.WaitingRoom, ParticipantState.Available)]
[TestCase(RoomType.ConsultationRoom2, RoomType.WaitingRoom, ParticipantState.Available)]
[TestCase(RoomType.ConsultationRoom1, RoomType.HearingRoom, ParticipantState.InHearing)]
[TestCase(RoomType.ConsultationRoom2, RoomType.HearingRoom, ParticipantState.InHearing)]
public async Task should_send_participant__status_messages_to_clients_and_asb_when_transfer_occurs(
RoomType from, RoomType to, ParticipantState status)
{
Expand Down

0 comments on commit 4102fb6

Please sign in to comment.