What Happens to a Message When the Other Person Is Offline?
You send a message and your friend’s phone is off. Where does it go? Here is the full journey of an offline message, and why the server cannot read it.
The idea of direct, device-to-device messaging has an obvious limit: both devices must be on at the same time. Real life is not like that. Phones are switched off, batteries die, people sleep. A messaging system that only worked when both people were online would be nearly useless. So what happens to a message when the other person is away? The answer shows how a private system handles a practical problem without giving up privacy.
The short version
If the other person is offline, your message is encrypted on your device and handed to the PeerFlow server, which keeps it only until the recipient's device comes online. It then delivers the message and deletes its copy. The server cannot read it at any point.
Step by step
- You write a message and press send.
- Your device encrypts it with a key that only the recipient's device can use. This is end-to-end encryption.
- Your device looks for a direct connection to the recipient. If they are offline, none exists.
- Your device sends the encrypted message to the server, which stores it as an unreadable block of data, labelled with where it should go.
- The recipient's phone comes online. It contacts the server and asks if anything is waiting.
- The server hands over the encrypted message and deletes its copy.
- The recipient's device decrypts it and shows it. Your chat shows that it was delivered.
Why the server cannot read it
Encryption happens on your device before anything leaves it. The key needed to open the message exists only on the recipient's devices. The server never has that key, so it holds only scrambled data. This is what end-to-end encryption means. Read the longer explanation in end-to-end encrypted chat explained.
What the server still knows
The server must know where to send a waiting message, so it knows that a message is waiting for a particular account, and roughly when and how large. It does not know what the message says. After delivery it keeps neither the content nor the encrypted copy. This is a much smaller footprint than a system that stores every conversation for years.
Notifications
When a message is waiting and your phone is asleep, the server can send an alert so your phone knows to wake up and fetch it. On Android, PeerFlow shows a notification that a message has arrived. For this to work reliably, the app's notification permission and the battery setting must allow it. See why notifications do not arrive on Android.
What about very long absences?
The server is meant to be a mailbox, not an archive, so waiting messages are for short gaps. If you are going to be offline for a long time, tell your contacts, and ask them to send anything important again when you are back. The chat shows a delivery mark once a message has arrived, so you can tell which ones are still waiting.
Comparing designs
| Typical server-stored chat | PeerFlow | |
|---|---|---|
| Online recipient | Via server | Direct between devices |
| Offline recipient | Server stores message | Server stores encrypted message briefly |
| Server can read content | Often | No |
| After delivery | Server keeps copy | Server deletes copy |
| Your history | On the server | Encrypted on your device |
Your own history
Delivered messages are kept in your device's own encrypted history, not on the server. That is why you can keep a backup in your PeerFlow folder. See encrypted chat backup. If you lose a device without a backup, old messages are gone, which is the price of not having them stored elsewhere.
Tips
- Keep the app updated, since delivery and notification fixes arrive with new versions.
- Allow notifications, or you will only see messages when you open the app.
- Make a backup of your history if it matters to you.
- Check delivery marks on important messages.
Related reading
For the whole route a message takes, read how messages travel. To learn more about the chat itself, see secure chat, and install the Android and Windows apps.
Frequently asked questions
Where does a message wait when the other person is offline?
It waits on the PeerFlow server in encrypted form, until the other person’s device comes online.
Can the server read the waiting message?
No. The message is encrypted on your device with a key only the recipient has, so the server holds data it cannot read.
When is the message deleted?
As soon as it has been delivered, the server deletes it.
What if the other person never comes online?
The server is a mailbox, not an archive: it is meant for short gaps. You can see in the chat whether a message has been delivered, and it is wise to resend anything important after a long absence.