# How a message reaches someone who isn't in range yet

> Every Knit phone keeps a copy of the messages it passes along and hands them to the next Knit phone it meets. So a message can reach your friend even if the two of you were never connected at the same moment.

Docs · How messages travel. Checked against Knit 2.9.0.

Most messaging apps need a live connection all the way from you to the other person. Knit can do without one. The phones around you pass your message along, and when there's no path to the other person right now, they hold on to it and keep it moving as people move around.

This is called store-and-forward: a phone stores the message, then forwards it later. It's what makes Knit useful at a festival or on a campsite, where people wander around and the mesh keeps changing shape.

## A message, step by step

1. You send Priya a message. Your phone passes it to every Knit phone in range, and each of those passes it to the phones in range of them, up to eight hops out.
2. Priya is too far away, so it doesn't reach her yet. Sam was standing near you, though, and Sam's phone keeps a copy.
3. Sam wanders to the other side of the field. When Sam's phone comes into range of Priya's, it hands the message over.
4. Priya's phone opens it, and a delivery receipt starts back toward you the same way. When it reaches you, your message shows Delivered.

*Sam's phone picks up a copy while Sam is near you, keeps it while Sam walks across the field, and hands it to Priya's phone when the two come into range. Neither of you had to be connected to the other at any point.*

- 1. You send: Your phone and Sam's phone side by side with a link between them. Sam's phone holds a copy of the message. Priya's phone is far to the right, out of range.
- 2. Sam walks over: Sam's phone has moved to the middle of the picture, still holding the message. No phone is in range of any other.
- 3. Priya gets it: Sam's phone is now beside Priya's, with a link between them. Priya's phone has the message.

Sam doesn't have to do anything, and never sees your message. It's a direct message, which is end-to-end encrypted, so Sam's phone carries it sealed and has no way to open it. All Sam needed was Knit running in the background.

When a carried copy is handed on later, it sets off with a fresh eight hops. So a message can cross far more than eight phones, as long as people keep carrying it toward the other person.

## What gets carried

Direct messages, group messages and posts in the Nearby room are all carried, along with the small things that go with them: reactions, delivery receipts, and changes to someone's name or status.

- Direct messages are offered to every phone your phone meets, so any of them can help get it to the person it's for.
- Group messages are offered only to members of that group. Your phone may carry a message for a group you aren't in, but when it hands one on later, it offers it only to phones on that group's member list.
- Nearby room posts are offered to everyone, because the room is open to everyone around. The room is plaintext by design: anyone in range can read it, including the phones carrying it.

## How long a message is carried

Direct and group messages are carried for up to 24 hours after they're sent. Nearby room posts are carried for up to 6 hours, because the room is busier and is mostly about what's happening around you now.

When the time is up, every phone deletes its copy, delivered or not. The clock starts when the message is sent, not when each phone got it, so all the copies expire at about the same time.

> **Why copies outlive delivery** Between phones on current versions of Knit, delivery receipts in direct and group chats are sealed too, so a carrying phone can't tell a delivered message from one still on its way. Rather than guess, every copy runs out its time. That keeps who has received what between you and the people you're talking to.

## How much one phone carries

Each phone carries up to 1,000 messages, counting reactions and receipts. No single person, group or the Nearby room can take more than 200 of those, so one busy conversation can't push everyone else's out. When a phone is full, it makes room by letting go of the oldest messages it's carrying for other people before any of your own.

## What the ticks under your message mean

- Sent: the message is on its way. If nobody is in range yet, your own phone carries it and hands it on as soon as someone is.
- Delivered, in a direct message: the person you wrote to has it.
- Delivered, in a group: at least one member has it. The message's details show who else does, for example "Delivered to 3 of 5".
- Delivered, in the Nearby room: at least one person received it.
- Not sent yet — waiting for their key: you wrote to someone your phone can't seal a message for yet, often right after adding them from a link. It waits on your phone and goes out by itself once their key reaches you.

A receipt travels back the same way the message went, so Delivered can show up a while after the message actually arrived.

## Helping your messages get through

- Keep Knit running. A phone carries messages only while Knit is on, and that includes yours carrying messages for other people.
- Leave Bluetooth and Wi-Fi switched on. Wi-Fi doesn't have to be connected to a network; Knit uses it to talk to other phones directly.
- To see it working, tap the status line at the top of your chat list. Your mesh shows how many messages your phone is carrying for other people right now.

## What to expect

- Someone has to make the trip. If no Knit phone moves from your side to the other person's within a day, the message expires before it arrives. For people too far apart for that, you can add an Internet relay, which carries direct and group chats, or a Meshtastic radio, which carries direct messages and the Nearby room. Both are optional and off until you turn them on.
- Carried messages can take minutes or hours to arrive, depending on how people move: store-and-forward trades speed for reach.
- A direct or group message stays sealed the whole time it's carried. Its envelope stays readable: which Knit identity sent it, who it's for, when it was sent and how big it is, because that's how phones know where to take it. For a group message, that includes the group's member list.
- Posts in the Nearby room are readable by everyone in range, and phones that carry the room pass them on to people who arrive in the 6 hours after they're posted.

## Common questions

### Can the people carrying my message read it?

Not if it's a direct or group message: those are end-to-end encrypted, and a carrying phone checks that a message really came from its sender without opening it. Posts in the Nearby room are plaintext by design, so anyone can read those.

### Do I need internet for this?

No. Store-and-forward happens between phones over Bluetooth and Wi-Fi, with no internet or cell service needed.

### Will I get notified twice if a message comes round again?

No. The same message can reach your phone more than once as different phones hand it over, and Knit notifies you only the first time.

### If I block someone, does my phone still carry their messages?

Yes, for other people. Blocking stops their messages from reaching you, and you won't see them. Carrying works the same for everyone, so a block on your phone doesn't cut that person off from the rest of the mesh.

### How much space does it take?

Very little. A phone keeps at most 1,000 carried messages, and none for longer than a day.

## Read next

- [Bluetooth and Wi-Fi Aware](https://getknit.app/docs/bluetooth-and-wifi-aware/index.md): Why Knit runs two radios at once, what each one is good at, and what Android asks you for.
- [What's encrypted](https://getknit.app/docs/encryption/index.md): What end-to-end encryption covers in direct and group chats, what stays visible, and how to verify a contact.
- [Try it in your browser](https://getknit.app/demo/): Pick who in the crowd gets Knit, and watch their phones carry a message across.
- [Internet relays](https://getknit.app/updates/internet-relays/index.md): An optional way to keep a conversation going when nobody can walk the message over.
- [Meshtastic radios](https://getknit.app/updates/meshtastic/index.md): Optional hardware that adds hops measured in kilometres.

Canonical page: https://getknit.app/docs/store-and-forward/
