Engineering

Why DropAsecret's notifications never say what the message says

A notification lands on a lock screen anyone can see. So on DropAsecret it says that something arrived, never what it says. Here's why, how we decide when not to notify you, and how we reach senders we don't know.

Hexer

Co-Founder & CEO

4 min read

DropAsecret's Sent screen on a phone, telling the sender that replies show up in their chats.

Most chat apps put the message right in the notification. DropAsecret doesn't. When an anonymous message arrives, your phone says "New anonymous message" and "Anonymous Fox 42 wrote to you. Open your inbox to read it." The words themselves only appear inside the app. Here's why, and what else goes into a notification on an app built around secrets.

The lock screen is the problem

A notification shows up in places you don't control: a lock screen face up on a table, a watch on your wrist, a laptop screen shared in class, a phone you've handed to a friend to show them a picture. For most apps that's fine. On an app where people send confessions, crushes and honest opinions, one line on a lock screen can be the whole secret.

So we made a simple rule: a notification tells you that something arrived, never what it says. The message only shows once you've opened the app.

It's worth being precise about the risk. A notification travels through a push service run by the company that makes your browser. Its contents are encrypted for your browser alone on the way, so the service carrying it can't read it. The risk was never really the journey. It's the screen at the end of it.

What a notification does say

Four things send a notification, and each says as little as it can:

  • A new message: "New anonymous message", with the conversation's nickname.
  • A reply to someone who wrote to you: the name on that person's link, and "replied".
  • A reveal request: the other side wants to show who they are, or to know who you are.
  • A reveal that went through: "Revealed".

Tapping any of them opens that conversation.

The nickname is the one you see in your inbox. It's made up when a conversation starts, from an animal and a number, or from the mask the sender picked. It tells you which chat it is without saying anything about who's in it.

One conversation, one notification

Every notification is tagged with its conversation. When a new one arrives for the same chat, it replaces the old one instead of piling up beside it, so ten messages in one conversation leave one notification, not ten. We also ask the phone to alert again each time. By default a replacement arrives silently, and a new message should never be silent.

Reveal requests are treated differently. They stay on the screen until you tap them, with a longer buzz on phones that support it, because they're the one thing someone is waiting on you to answer.

Not while you're reading

If the conversation is open in front of you, you shouldn't get a notification for the message you're already looking at. Every chat app does this, but on the web it takes more work than you'd think.

The obvious way is to send every notification and let the page on the phone decide whether to show it. That doesn't work on iPhone: a website that receives a notification and doesn't show it can lose its permission to send them. So the decision has to be made before anything is sent.

While a conversation is open, visible and in front of you, the page tells our server so once a minute. Each check-in counts for 90 seconds, so one late check-in loses nothing, and a page that disappears without a word, from a crash or a flat battery, stops counting soon after. Leaving the chat, switching apps or locking your phone tells the server straight away. When a message arrives, the server checks first, and if you're reading, it sends nothing.

Notifying someone we don't know

Senders on DropAsecret don't need an account. But a sender wants to know when you reply, and we don't know who they are.

When a sender turns notifications on, their browser is tied to them through a random secret kept in a cookie on their device. We don't store that secret. We store a keyed fingerprint of it, which lets us recognise the same browser again but can't be turned back into the cookie. When you reply, we find the devices tied to that fingerprint and notify them, without learning anything about who's holding the phone. If the sender also has an account, their signed-in devices are notified too, and each device only once.

The small rules

  • Messages caught by your blocked words go to your Filtered folder and don't notify you.
  • You can mute a single conversation, and the rest carry on as normal.
  • New messages are marked as urgent, so phones deliver them straight away instead of holding them back to save battery.
  • If a phone is switched off, its notification waits for up to a day, then it's dropped. A day-old alert isn't much use.
  • Newer browsers can show the notification on their own, even if the part of our app that runs in the background on your phone doesn't start.
  • When a browser stops accepting notifications, because you turned them off or its permission ran out, we forget it the next time we try.

What it adds up to

A notification on DropAsecret is a tap on the shoulder: something arrived, here's which conversation, open it when you're ready. The message itself stays inside the app, where only you can see it.

Want them on your phone? Here's how to turn on DropAsecret notifications.

Share this post

Co-Founder & CEO

Co-founded Hexerize and leads product direction and day-to-day engineering.

From Hexerize

See what we're building.

Hexerize is a technology company from Ghana. Take a look at our apps, or get in touch.