Move event sending into the command handler.