A message travels from your device to a friend's through your network, the platform's server, and their network. The encryption model the service uses decides which of those parties can read it.