Exemple #1
0
        public Task JoinNotificationRoom(string passengerEmail)
        {
            Passenger passenger = _passengerRepository.GetPassengerByEmail(passengerEmail);

            if (passenger.NotificationRoom == null)
            {
                passenger.NotificationRoom = CreateNotificationRoomName(passenger.Email);
                _passengerRepository.SaveChanges();
            }

            return(Groups.AddToGroupAsync(Context.ConnectionId, passenger.NotificationRoom));
        }
        public ActionResult <Passenger> GetPassenger()
        {
            Passenger passenger = _passengerRepository.GetPassengerByEmail(User.Identity.Name);

            return(passenger);
        }