Skip to content

Commit

Permalink
return the consultation answer
Browse files Browse the repository at this point in the history
  • Loading branch information
shaed-parkar committed Aug 28, 2019
1 parent d66f2a0 commit 649a252
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions VideoAPI/Video.API/Controllers/ConsultationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ public async Task<IActionResult> RespondToAdminConsultationRequest(AdminConsulta
{
await _videoPlatformService.TransferParticipantAsync(conference.Id, participant.Id,
participant.CurrentRoom.Value, request.ConsultationRoom);
await _hubContext.Clients.Group(participant.Username.ToLowerInvariant()).AdminConsultationMessage
(conference.Id, request.ConsultationRoom, participant.Username.ToLowerInvariant(),
ConsultationAnswer.Accepted);
}

return NoContent();
Expand Down
5 changes: 4 additions & 1 deletion VideoAPI/VideoApi.Events/Hub/EventHubClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.SignalR;
using VideoApi.Contract.Requests;
using VideoApi.Domain.Enums;
using VideoApi.Services;

Expand All @@ -12,7 +13,9 @@ public interface IEventHubClient
Task ParticipantStatusMessage(string email, ParticipantState participantState);
Task ConferenceStatusMessage(Guid conferenceId, ConferenceState conferenceState);
Task ConsultationMessage(Guid conferenceId, string requestedBy, string requestedFor, string result);
Task AdminConsultationMessage(Guid conferenceId, RoomType room, string requestedFor);

Task AdminConsultationMessage(Guid conferenceId, RoomType room, string requestedFor,
ConsultationAnswer? answer = null);
Task HelpMessage(Guid conferenceId, string participantName);
}

Expand Down
1 change: 1 addition & 0 deletions VideoAPI/VideoApi.Events/VideoApi.Events.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

<ItemGroup>
<ProjectReference Include="..\VideoApi.Common\VideoApi.Common.csproj" />
<ProjectReference Include="..\VideoApi.Contract\VideoApi.Contract.csproj" />
<ProjectReference Include="..\VideoApi.DAL\VideoApi.DAL.csproj" />
<ProjectReference Include="..\VideoApi.Domain\VideoApi.Domain.csproj" />
<ProjectReference Include="..\VideoApi.Services\VideoApi.Services.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public async Task should_raise_admin_consultation_message(RoomType? transferTo)

EventHubClientMock.Verify(x =>
x.AdminConsultationMessage(conference.Id, transferTo.Value,
participantForEvent.Username.ToLowerInvariant()),
participantForEvent.Username.ToLowerInvariant(), null),
Times.Once);
}
}
Expand Down

0 comments on commit 649a252

Please sign in to comment.