public async Task <IActionResult> MessageTo([FromBody] MessagingHubModel message) { _messagingHubManager.Send(new MessagingHubModel() { From = "Server", To = message.To, Message = message.Message }); return(Ok()); }
public async Task <IActionResult> BroadcastMessage([FromBody] MessagingHubModel message) { _messagingHubManager.Broadcast(new MessagingHubModel() { From = "Server", To = "Everybody", Message = message.Message }); return(Ok()); }