When you click a username in the UserList component, the mediator sends a "selectUser" event to the MessageInput component. The MessageInput component then displays the selected recipient and sends messages to that user only. If no recipient is selected, messages are sent to all users. The MessageList component displays messages with the recipient name (if any).