private void GreetClients(ConversationCoordinatorActor.StartConversation msg) { _participants = msg.Participants.ToList(); var response = new ConversationMessages.ConversationStarted(_conversationId, _participants.Select(p => p.ClientId).ToList()); foreach (var participant in _participants) { participant.MessagingHandler.Tell(response); } }
private void LocateConversation(ConversationCoordinatorActor.LocateConversation msg) { if (_participants.Count != msg.Participants.Count()) { Sender.Tell(new ConversationLocationAggregatorActor.ConversationNotFound()); return; } if (_participants.All(p => msg.Participants.Contains(p.ClientId))) { Sender.Tell(new ConversationLocationAggregatorActor.ConversationLocated(_conversationId)); } else { Sender.Tell(new ConversationLocationAggregatorActor.ConversationNotFound()); } }